Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor

Summary

CVECVE-2026-40682
StatePUBLISHED
Assignerapache
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-05-04 17:16:23 UTC
Updated2026-06-30 09:16:24 UTC
DescriptionXML 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.

Risk And Classification

Primary CVSS: v3.1 9.1 CRITICAL from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

EPSS: 0.005150000 probability, percentile 0.400530000 (date 2026-07-04)

Problem Types: CWE-611 | CWE-611 CWE-611 Improper Restriction of XML External Entity Reference | CWE-611 Improper Restriction of XML External Entity Reference


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
3.1ADPCVSS7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
3.10b0ca135-0b70-47e7-9f44-1890c2a1c46cSecondary7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Apache Opennlp All All All All
Application Apache Opennlp 3.0.0 m1 All All
Application Apache Opennlp 3.0.0 m2 All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Apache Software Foundation Apache OpenNLP affected 2.0 2.5.9 semver Not specified
CNA Apache Software Foundation Apache OpenNLP affected 3.0.0-M1 3.0.0-M3 semver Not specified
CNA Apache Software Foundation Apache OpenNLP affected 1.9.5 semver Not specified
ADP Red Hat Red Hat Build Of Apache Camel For Spring Boot 4 Not specified Not specified
ADP Red Hat Red Hat Data Grid 8 Not specified Not specified
ADP Red Hat Red Hat Fuse 7 Not specified Not specified
ADP Red Hat Red Hat JBoss Enterprise Application Platform 8 Not specified Not specified
ADP Red Hat Red Hat JBoss Enterprise Application Platform Expansion Pack Not specified Not specified
ADP Red Hat Red Hat OpenShift AI RHOAI Not specified Not specified

References

ReferenceSourceLinkTags
access.redhat.com/security/cve/CVE-2026-40682 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
www.openwall.com/lists/oss-security/2026/05/01/19 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com Mailing List, Third Party Advisory
bugzilla.redhat.com/show_bug.cgi 0b0ca135-0b70-47e7-9f44-1890c2a1c46c bugzilla.redhat.com
lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 [email protected] lists.apache.org Mailing List, Vendor Advisory
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json 0b0ca135-0b70-47e7-9f44-1890c2a1c46c security.access.redhat.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Subramanian S (en)

Additional Advisory Data

SourceTimeEvent
ADP2026-05-04T19:01:14.287ZReported to Red Hat.
ADP2026-05-04T16:55:55.834ZMade public.
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report