CVE-2026-40682
No exploitation reported by the sources we read.
- Published2026-05-04
- Fixed in3.0.0-M3 · 2.5.9 · 1.9.5
- WeaknessCWE-611
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2026-05-0417:16CVE publishedNVD
Versions per branch
OSV · NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.0 | ≥ 3.0.0-M1, < 3.0.0-M3 | 3.0.0-M3 | OSV |
| 2.5 | < 2.5.9 | 2.5.9 | NVD |
| 2.x | ≥ 2.0.0, < 2.5.9 | 2.5.9 | OSV |
| 1.9 | < 1.9.5 | 1.9.5 | OSV |
| 3.0 | = 3.0.0 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As apache, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- Apache Software Foundation Apache OpenNLPother versions: not affected
package org.apache.opennlp:opennlp-toolshttps://repo.maven.apache.org/maven2/
Affected- ≥ 2.0, < 2.5.9fixed in 2.5.9semver
- ≥ 3.0.0-M1, < 3.0.0-M3fixed in 3.0.0-M3semver
- < 1.9.5fixed in 1.9.5semver
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-06-30
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- apache-hopChainguardall versions · fixed in 2.17.0-r9and 1 other package
- apache-opennlpUbuntu:26.10all versions · no fixed version listed
- apache-opennlpUbuntu:26.04:LTSall versions · no fixed version listed
- apache-opennlpUbuntu:25.10all versions · no fixed version listed
- apache-opennlpUbuntu:24.04:LTSall versions · no fixed version listed
- apache-opennlpUbuntu:22.04:LTSall versions · no fixed version listed
- apache-opennlpUbuntu:20.04:LTSall versions · no fixed version listed
- apache-opennlpDebian:14all versions · fixed in 2.5.9-1
7 more package ranges on OSV.dev
Vendor advisories
org.apache.opennlp/opennlp-tools: Apache OpenNLP: XML External Entity (XXE) vulnerability via crafted dictionary parsing
rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9 as a component of Red Hat OpenShift AI (RHOAI)
Red Hat Security Advisory: RHOAI 2.25.12 - Red Hat OpenShift AI
Red Hat Security Advisory: RHOAI 3.4.5 - Red Hat OpenShift AI
Fix
- Update Apache opennlp to 3.0.0-M3 · 2.5.9 · 1.9.5
- Vendor fix Red Hat Product Security RHSA-2026:87410 · 4 productsFor Red Hat OpenShift AI 2.25.12 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
- Vendor fix Red Hat Product Security RHSA-2026:84734 · 4 productsFor Red Hat OpenShift AI 3.4.5 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
- Workaround from the vendor Red Hat Product Security RHSA-2026:87410 · 205 productsFor affected deployments that process dictionary XML from untrusted sources, use only trusted dictionary files. If untrusted dictionary input must be processed, reject documents containing a DOCTYPE declaration before passing them to OpenNLP’s dictionary parser.
- No fix planned, says the vendor Red Hat Product Security CVE-2026-40682 · 1 productWill not fix
Advisories and patches
- lists.apache.orgVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-03
- Metasploit modules
- none listed Metasploit Framework
Sources
- NVDCVE recordread 2026-10-27
- CISA-ADPSSVC decisionnone2026-05-05
- CISA-ADPCVSS 3.19.12026-05-05
- CNACVSS 3.17.5known since 2026-10-27
- CNAweakness (CWE)CWE-611known since 2026-10-27
- FIRST EPSSEPSS score0.5 %2026-12-03
- OSVaffected packages—
- GitHub AdvisoriesadvisoryCritical2026-05-08
Identifiers
- CGA-4g9q-j2vh-c462same flawChainguard · CC-BY-NC-ND-4.0
- CGA-4gpx-7g2q-qph5same flawChainguard · CC-BY-NC-ND-4.0
- CGA-59r2-fch3-2pqpsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-95mj-j9g3-9qr3same flawChainguard · CC-BY-NC-ND-4.0
- CGA-9754-jfwx-4qfrsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-c5fj-q9h7-2926same flawChainguard · CC-BY-NC-ND-4.0
- CGA-g7v3-6p86-jp77same flawChainguard · CC-BY-NC-ND-4.0
- CGA-h7v2-x6hp-6jv2same flawChainguard · CC-BY-NC-ND-4.0
- CGA-hvpj-m3xp-ff8xsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-j93j-wpx7-q4jxsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-m23r-4qmc-phvhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-m29v-pxqh-3wmqsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-p385-h32w-c2qfsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-q247-329v-wmr9same flawChainguard · CC-BY-NC-ND-4.0
- CGA-r6rr-mcw9-84xhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-vrj5-hc5c-2m62same flawChainguard · CC-BY-NC-ND-4.0
- CGA-wpmx-hp9f-jj7csame flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2026-27003same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-4v8g-86x5-3vrcsame flawGitHub Advisory Database · CC-BY-4.0
- openSUSE-SU-2026:11281-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Published
- 2026-05-04
- Last modified
- 2026-10-26
- NVD status
- Modified
- GitHub advisory
- GHSA-4v8g-86x5-3vrc
Frequently asked questions
What is CVE-2026-40682?
Is CVE-2026-40682 actively exploited?
What is the CVSS score for CVE-2026-40682?
Running opennlp-tools? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-4v8g-86x5-3vrc
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0