Home / Apache Software Foundation / Apache OpenNLP / CVE-2026-40682
CVE-2026-40682: is it exploited, and which versions of Apache Software Foundation Apache OpenNLP are affected and fixed?
CVE-2026-40682 is a XML external entity (XXE) vulnerability in Apache Software Foundation Apache OpenNLP. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:38 UTC). Affected: org.apache.opennlp:opennlp-tools from 2.0.0 before 2.5.9, org.apache.opennlp:opennlp-tools from 3.0.0-M1 before 3.0.0-M3 and org.apache.opennlp:opennlp-tools before 1.9.5 (GitHub advisory GHSA-4v8g-86x5-3vrc). Fixed in 2.5.9, 3.0.0-M3 and 1.9.5 (GitHub advisory GHSA-4v8g-86x5-3vrc). Severity: Critical (9.1, CVSS 3.1, from CISA-ADP).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:38 UTC, CVE record November 19, 2026, 07:07 UTC and NVD November 19, 2026, 07:11 UTC.
What is CVE-2026-40682?
Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
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.
From the CVE record by apache, last updated September 2, 2026, 12:04 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Apache Software Foundation | Apache OpenNLP org.apache.opennlp:opennlp-tools | from 2.0 before 2.5.9 from 3.0.0-M1 before 3.0.0-M3 before 1.9.5 | 2.5.9, 3.0.0-M3, 1.9.5 |
As the CVE record by apache states it, last updated September 2, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Maven | org.apache.opennlp:opennlp-tools | >= 2.0.0, < 2.5.9 | 2.5.9 | GHSA-4v8g-86x5-3vrc |
| Maven | org.apache.opennlp:opennlp-tools | >= 3.0.0-M1, < 3.0.0-M3 | 3.0.0-M3 | GHSA-4v8g-86x5-3vrc |
| Maven | org.apache.opennlp:opennlp-tools | < 1.9.5 | 1.9.5 | GHSA-4v8g-86x5-3vrc |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated October 2, 2026. Summary: Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| apache | opennlp | before 2.5.9 | application |
| apache | opennlp | 3.0.0 | application |
NVD analysis (status Modified), last modified October 26, 2026, 19:10 UTC.
How severe is CVE-2026-40682?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N | CISA-ADP |
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | redhat-SADP |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-40682 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: yes; technical impact: total (CISA ADP, May 5, 2026)
- EPSS
- 0.51% probability of exploitation activity in the next 30 days, percentile 45.3 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-611 Improper Restriction of XML External Entity Reference
Where are the vendor advisories and references?
- https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 vendor-advisory
- http://www.openwall.com/lists/oss-security/2026/05/01/19
- https://access.redhat.com/security/cve/CVE-2026-40682 vdb-entry, x_refsource_REDHAT
- RHBZ#2466484 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json x_sadp-csaf-vex
Who found and reported it?
- Subramanian S (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- April 14, 2026
- Published
- May 4, 2026, 16:55 UTC
- CVE record updated
- September 2, 2026, 12:04 UTC by apache
- NVD
- Modified, last modified October 26, 2026, 19:10 UTC
- Last checked
- CVE list November 19, 2026, 07:07 UTC; NVD November 19, 2026, 07:11 UTC; KEV December 3, 2026, 10:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Apache OpenNLP?
- Nov 19, 2026CVE-2026-120404 Apache Software Foundation Apache OpenNLP: regular expression denial of service (ReDoS)
- Sep 11, 2026CVE-2026-82617 Apache Software Foundation Apache OpenNLP: regular expression denial of service (ReDoS)
- Sep 11, 2026CVE-2026-67211 Apache Software Foundation Apache OpenNLP: memory Allocation with Excessive Size Value
- Jul 24, 2026CVE-2026-63317 Apache Software Foundation Apache OpenNLP: unsafe reflection
- May 4, 2026CVE-2026-42027 Apache Software Foundation Apache OpenNLP: unsafe reflection
- May 4, 2026CVE-2026-42440 Apache Software Foundation Apache OpenNLP: memory Allocation with Excessive Size Value
- Oct 2, 2017CVE-2017-12620 Apache Software Foundation Apache OpenNLP: XML external entity (XXE)
Questions about CVE-2026-40682
Is CVE-2026-40682 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:38 UTC. FIRST's EPSS gives it a 0.51% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Apache Software Foundation Apache OpenNLP are affected by CVE-2026-40682?
org.apache.opennlp:opennlp-tools from 2.0.0 before 2.5.9, org.apache.opennlp:opennlp-tools from 3.0.0-M1 before 3.0.0-M3 and org.apache.opennlp:opennlp-tools before 1.9.5, per the GitHub advisory GHSA-4v8g-86x5-3vrc. The tables above give every range the sources list.
Which version fixes CVE-2026-40682?
2.5.9, 3.0.0-M3 and 1.9.5, per the GitHub advisory GHSA-4v8g-86x5-3vrc. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-40682?
Critical (9.1, CVSS 3.1, from CISA-ADP). The severity table above shows each score with its source.
Where is the official record of CVE-2026-40682?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.