Open
Description
Currently, this project uses 7.5.0 of Apache Lucene: https://github.com/stanfordnlp/CoreNLP/blob/main/pom.xml#L77
As a result, the following vulnerability is introduced into projects:
- https://osv.dev/vulnerability/OSV-2023-705
- Fix stack overflow in RegExp for long string apache/lucene#12462
We use Sonartype IQ Server (NexusIQ) to scan for vulnerabilites in our dependencies and that is how this was flagged.
As a workaround, we upgrade the dependencies:
[versions]
lucene = "9.8.0"
configurations.configureEach {
resolutionStrategy {
dependencySubstitution {
substitute(module("org.apache.lucene:lucene-analyzers-common"))
.using(module("org.apache.lucene:lucene-analysis-common:${libs.versions.lucene.get()}"))
.because("Module was renamed in 9.x release")
}
eachDependency {
if (requested.group == "org.apache.lucene") {
useVersion(libs.versions.lucene.get())
because("""
Resolves IQ issue.
There does not exist a BOM either https://github.com/apache/lucene/issues/11422, so bump all
lucene dependencies to keep them in sync rather than the single one.
""".trimIndent())
}
}
}
}
But as you can see, this adds quite a bit of ceremony.
It would be better if CoreNLP can upgrade Apache Lucene so that the above would not be needed.
Metadata
Metadata
Assignees
Labels
No labels