---
title: "CVE-2026-40682: Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing"
url: https://erroneo.us/security/cve/CVE-2026-40682/
description: "CVE-2026-40682 (org.apache.opennlp:opennlp-tools (Maven)): XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-05-04
date_modified: 2026-10-02
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-40682"
kev: false
cvss: 7.5
epss: 0.00844
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-40682: Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing

**Signal:** Normal patch cycle. No exploitation signal; fix it in your next routine update if you are affected. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.8% , percentile 57: FIRST’s model estimates a 0.8% chance of exploitation activity in the next 30 days, higher than 57% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes org.apache.opennlp:opennlp-tools (Maven) >= 3.0.0-M1, < 3.0.0-M3, fixed in 3.0.0-M3 ; org.apache.opennlp:opennlp-tools (Maven) >= 2.0.0, < 2.5.9, fixed in 2.5.9 ; org.apache.opennlp:opennlp-tools (Maven) < 1.9.5, fixed in 1.9.5 . Check your lockfile, including transitive dependencies.

## What it is

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 FEATURESECUREPROCESSING 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 FEATURESECUREPROCESSING 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.

## Affected packages

- Maven `org.apache.opennlp:opennlp-tools` >= 3.0.0-M1, < 3.0.0-M3 → fixed: 3.0.0-M3
- Maven `org.apache.opennlp:opennlp-tools` >= 2.0.0, < 2.5.9 → fixed: 2.5.9
- Maven `org.apache.opennlp:opennlp-tools` < 1.9.5 → fixed: 1.9.5

## Affected products (CVE record)

- Apache Software Foundation Apache OpenNLP: 2.0 < 2.5.9, 3.0.0-M1 < 3.0.0-M3, < 1.9.5

## Severity

- CISA-ADP CVSS 3.1: 9.1 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- redhat-SADP CVSS 3.1: 7.5 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub CVSS 3.1: 9.1 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.84% probability of exploitation activity in the next 30 days; percentile 57.

## Sources

- [lists.apache.org](https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6)
- [GitHub Advisory GHSA-4v8g-86x5-3vrc](https://github.com/advisories/GHSA-4v8g-86x5-3vrc)
- [CVE.org record CVE-2026-40682](https://www.cve.org/CVERecord?id=CVE-2026-40682)
- [NVD entry CVE-2026-40682](https://nvd.nist.gov/vuln/detail/CVE-2026-40682)
- [openwall.com](http://www.openwall.com/lists/oss-security/2026/05/01/19)
- [access.redhat.com](https://access.redhat.com/security/cve/CVE-2026-40682)
- [RHBZ#2466484](https://bugzilla.redhat.com/show_bug.cgi?id=2466484)
- [security.access.redhat.com](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json)

---
Source page: https://erroneo.us/security/cve/CVE-2026-40682/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
