CVE-2026-40682: Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
Vulnerability summary
CVE-2026-40682 is a critical (CVSS 9.1) vulnerability in apache software foundation apache opennlp. EPSS estimates a 0.50% chance of exploitation in the next 30 days, higher than 43.4% of scored vulnerabilities.
Severe, CVSS 9.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 20-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 1 · Related 2Timeline
- 04-05-2026PublishedVulnerability first disclosed.
- 02-09-2026Last modifiedVulnerability information updated.
Description
XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP DictionaryEntryPersistor Versions Affected: before 2.5.9, before 3.0.0-M3 Description: The DictionaryEntryPersistor class initializes a static SAXParserFactory at class-load time without enabling FEATURE_SECURE_PROCESSING or disabling DTD processing. When create(InputStream, EntryInserter) is invoked, the only feature set on the XMLReader is namespace support — external entity resolution and DOCTYPE declarations remain fully enabled. An attacker who can supply a crafted dictionary file (e.g., a stop-word list or domain dictionary) containing a malicious DOCTYPE declaration can trigger local file disclosure via file:// entity references or server-side request forgery via http:// entity references during SAX parsing, before the application processes a single dictionary entry. This is inconsistent with the project's own XmlUtil.createSaxParser() helper, which correctly sets FEATURE_SECURE_PROCESSING and disallow-doctype-decl and is used by all other XML parsing paths in the codebase. The public Dictionary(InputStream) constructor delegates directly to this method and is the documented API for loading user-supplied dictionaries, making untrusted input a realistic scenario. Mitigation: 2.x users should upgrade to 2.5.9. 3.x users should upgrade to 3.0.0-M3. Users who cannot upgrade immediately should ensure that all dictionary files are sourced from trusted origins and should consider wrapping the Dictionary(InputStream) constructor with input validation that rejects any XML containing a DOCTYPE declaration before it reaches the parser.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NDiffers
- OSV · DebianEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · WolfiEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · MavenEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- NVDNIST9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS trend
Probability
0.50%
Chance of exploitation in the next 30 days
Percentile
43%
Versus all other CVEs
30-day change
Decrease -0.35 pp
From 0.84% on 21-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard5 products
- apache-hop< 2.17.0-r9
- apache-hop-fips< 2.17.0-r9
- solr-9-full< 9.10.1-r17
- solr-fips-9-full< 9.10.1-r6
- thingsboard-tb-node< 4.3.1.1-r7
Apache1 product
- opennlp< 2.5.9 | 3.0.0:m1 | 3.0.0:m2
Apache software foundation1 product
- apache opennlp≥ 2.0, < 2.5.9 | ≥ 3.0.0-M1, < 3.0.0-M3 | < 1.9.5
Debian1 product
- apache-opennlpAll versions (No fix recorded) | < 2.5.9-1
Org.apache.opennlp1 product
- opennlp-tools≥ 2.0.0, < 2.5.9 | ≥ 3.0.0-M1, < 3.0.0-M3 | < 1.9.5
Ubuntu1 product
- apache-opennlpAll versions (No fix recorded)
Wolfi1 product
- thingsboard-tb-node< 4.3.1.1-r7
7 vendors · 11 products
References
16 linksShow all 16 references
- github.com/apache/opennlpPACKAGE