CVE-2026-40682
published critical CVSS 3.1 · 9.1Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Apache Software Foundation | — | org.apache.opennlp:opennlp-toolsApache OpenNLP · 2.0 to < 2.5.9 · 3.0.0-M1 to < 3.0.0-M3 · 0 to < 1.9.5 · Other versions: unaffected | Affected | Not stated | apache |
| Red Hat | — | opennlp-toolsRed Hat build of Apache Camel for Spring Boot 4 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | opennlp-toolsRed Hat Data Grid 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | opennlp-maxentRed Hat Fuse 7 | Unaffected | Not required | redhat-SADP |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolss390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
Show 17 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Red Hat | — | opennlp-toolsRed Hat Fuse 7 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | opennlp-toolsRed Hat JBoss Enterprise Application Platform 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | opennlp-toolsRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-trustyai-service-rhel9Red Hat OpenShift AI (RHOAI) | Affected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9Red Hat OpenShift AI (RHOAI) | Affected | Not stated | redhat-SADP |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlps390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addons390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimaaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimappc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimas390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimax86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
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.
A flaw was found in Apache OpenNLP. A remote attacker can exploit this vulnerability by providing a specially crafted dictionary file. This can lead to an XML External Entity (XXE) injection, which allows for the disclosure of local files or enables server-side request forgery (SSRF), where the server makes unauthorized requests to other systems.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.1 / 10
- Severity
- critical
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Apache Software Foundation | Apache OpenNLP | 2.0 to < 2.5.9 (affected · semver)3.0.0-M1 to < 3.0.0-M3 (affected · semver)0 to < 1.9.5 (affected · semver)Default: unaffected | apache · cna |
| Red Hat | Red Hat build of Apache Camel for Spring Boot 4 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Data Grid 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Fuse 7 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Fuse 7 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: affected | redhat-SADP · adp |
Weaknesses
2- CWE-611 CWE-611 Improper Restriction of XML External Entity Reference
- CWE-611 Improper Restriction of XML External Entity Reference
References
5- http://www.openwall.com/lists/oss-security/2026/05/01/19
- https://access.redhat.com/security/cve/CVE-2026-40682
- RHBZ#2466484 https://bugzilla.redhat.com/show_bug.cgi?id=2466484
- https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json
Provider assertions
4apache · cna
Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
redhat-SADP · adp
org.apache.opennlp/opennlp-tools: Apache OpenNLP: XML External Entity (XXE) vulnerability via crafted dictionary parsing
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 38df3ef47b5a1f2b371e07e1f154aab6a784aebc758229315472c5062b51743a
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record