XML external entityin Apache OpenNLP.
No public exploit found; not on exploited lists.
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.
- Upgrade Apache OpenNLP to 1.9.5, 2.5.9, 3.0.0-M3 or later, whichever matches your release line.
- Upgrade org.apache.opennlp:opennlp-tools (Maven) to 1.9.5, 2.5.9, 3.0.0-M3 or later, whichever matches your release line.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 14 Apr 2026CVE ID reserved by apache.
- 4 May 2026Published in the CVE List.
- 2 Sep 2026CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other OpenNLP vulnerabilities
Same weakness: XML external entity
- lists.apache.org vendor-advisory
- www.openwall.com
- access.redhat.com vdb-entry, x_refsource_REDHAT
- bugzilla.redhat.com issue-tracking, x_refsource_REDHAT
- security.access.redhat.com x_sadp-csaf-vex
Patchminder. CVE-2026-40682: XML external entity in Apache OpenNLP. https://patchminder.com/cve/cve-2026-40682/ (accessed 5 December 2026).