Quick answers
- Is CVE-2026-40682 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40682 being exploited in the wild.
- How severe is CVE-2026-40682?
- Critical severity, with a CVSS score of 9.1, published 4 May 2026.
- Which products and versions are affected?
- org.apache.opennlp:opennlp-tools (Maven) ECOSYSTEM:introduced=2.0.0,fixed=2.5.9.
- Is there a fix for CVE-2026-40682?
- Yes. org.apache.opennlp:opennlp-tools (Maven): upgrade to 2.5.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40682 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40682?
- Check whether you run org.apache.opennlp:opennlp-tools (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- org.apache.opennlp:opennlp-tools (Maven): upgrade to 2.5.9 or later
# set org.apache.opennlp:opennlp-tools to 2.5.9 in your pom.xml or build.gradle
Technical details
The DictionaryEntryPersistor class in Apache OpenNLP initializes a static SAXParserFactory without enabling FEATURE_SECURE_PROCESSING or disabling DTD processing. When the create(InputStream, EntryInserter) method or the public Dictionary(InputStream) constructor is invoked, the underlying XMLReader remains configured to resolve external entities and DOCTYPE declarations. A remote attacker can exploit this by providing a malicious XML-based dictionary file (such as a stop-word list) containing crafted DOCTYPE declarations. Successful exploitation allows for local file disclosure via file:// protocols or Server-Side Request Forgery (SSRF) via http:// protocols. The issue has been addressed in versions 2.5.9 and 3.0.0-M3 by aligning the parser configuration with the project's secure XmlUtil helper.
Affected products
- Apache OpenNLP < 2.5.9, 3.0.0-M1, 3.0.0-M2
Identifiers
- CVE-2026-40682
- GHSA-4v8g-86x5-3vrc
Timeline
- 2026-05-01: disclosed: Initial disclosure on oss-security mailing list
- 2026-05-04: advisory: NVD publication date