CVE-2026-40682
Last modified
CVE-2026-40682 is a critical-severity vulnerability rated 9.1/10 on the CVSS scale. 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. EPSS estimates a 0.52% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Apache | Opennlp | < 2.5.9 | — |
| Apache | Opennlp | 3.0.0 | M1 |
References
- https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6Mailing List, Vendor Advisory
- http://www.openwall.com/lists/oss-security/2026/05/01/19Mailing List, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-40682?
How severe is CVE-2026-40682?
How do I fix CVE-2026-40682?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-40641Dell PowerFlex Manager, version(s) prior to 5.1.0.1, contain…4.8
- CVE-2026-4065The Smart Slider 3 plugin for WordPress is vulnerable to una…5.4
- CVE-2026-4066The Smart Custom Fields plugin for WordPress is vulnerable t…4.3
- CVE-2026-4067The Ad Short plugin for WordPress is vulnerable to Stored Cr…6.4
- CVE-2026-40677The use of insecure HTTP transport within AMD optional tools…7.7
- CVE-2026-4068The Add Custom Fields to Media plugin for WordPress is vulne…4.3
- CVE-2026-40683In OpenStack Keystone before 28.0.1, the LDAP identity backe…7.7
- CVE-2026-40684In Exim before 4.99.2, on systems using musl libc (not glibc…7.5
- CVE-2026-40685In Exim before 4.99.2, when JSON lookup is enabled, an out-o…9.8
- CVE-2026-40686In Exim before 4.99.2, when utf8 operators are enabled, ther…5.3
- CVE-2026-40687In Exim before 4.99.2, when the SPA authentication driver is…9.1
- CVE-2026-40688An out-of-bounds write vulnerability [CWE-787] vulnerability…7.2
Are you affected by CVE-2026-40682?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
