cve.bz

CVE-2026-40682 apache opennlp

9.1 criticalEPSS 0.5%Fix available

Critical (9.1) in apache opennlp. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.opennlp:opennlp-tools 1.9.5, 2.5.9, 3.0.0-M3.

On this page
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.

Severity

CVSS 3.1

9.1 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 43rd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2026-05-05. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-611 Improper Restriction of XML External Entity Reference
OWASP Top 10
A02:2025 Security Misconfiguration
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40682 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40682?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40682?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40682 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-40682

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-40682](https://cve.bz/cve/badge/CVE-2026-40682.svg)](https://cve.bz/cve/CVE-2026-40682)

HTML:

<a href="https://cve.bz/cve/CVE-2026-40682"><img src="https://cve.bz/cve/badge/CVE-2026-40682.svg" alt="CVE-2026-40682"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache OpenNLPfrom 2.0 before 2.5.9
Apache Software Foundation Apache OpenNLPfrom 3.0.0-M1 before 3.0.0-M3
Apache Software Foundation Apache OpenNLPbefore 1.9.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4v8g-86x5-3vrcMavenorg.apache.opennlp:opennlp-tools>=2.0.0 <2.5.92.5.9
GHSA-4v8g-86x5-3vrcMavenorg.apache.opennlp:opennlp-tools>=3.0.0-M1 <3.0.0-M33.0.0-M3
GHSA-4v8g-86x5-3vrcMavenorg.apache.opennlp:opennlp-tools<1.9.51.9.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13apache-opennlpno fix listedDEBIAN-CVE-2026-40682
Debian14apache-opennlp2.5.9-1DEBIAN-CVE-2026-40682
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 moreapache-opennlpno fix listedUBUNTU-CVE-2026-40682
openSUSETumbleweedopennlp1.9.5-1.1openSUSE-SU-2026:11281-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Severity: Important

This issue requires a vulnerable product to parse an attacker-controlled OpenNLP dictionary. The vulnerable parser can disclose local files or cause server-side requests. The CVSS vector requires neither privileges nor user interaction once that parsing path is reached. This potential confidentiality impact supports Red Hat’s Important rating, while Apache classifies the issue as Moderate. Product streams that do not reach this parsing path are assessed separately in the affectedness data.

Red Hat's mitigation

For affected deployments that process dictionary XML from untrusted sources, use only trusted dictionary files. If untrusted dictionary input must be processed, reject documents containing a DOCTYPE declaration before passing them to OpenNLP’s dictionary parser.

ProductPackageStateAdvisory
Red Hat OpenShift AI 2.25rhoai/odh-trustyai-service-rhel9:1790933094Fixed 2026-10-21RHSA-2026:87410
Red Hat OpenShift AI 3.4rhoai/odh-trustyai-service-rhel9:1791792525Fixed 2026-10-19RHSA-2026:84734
Red Hat build of Apache Camel for Spring Boot 4opennlp-toolsNot affected
Red Hat Data Grid 8opennlp-toolsNot affected
Red Hat Fuse 7opennlp-maxentNot affected
Red Hat Fuse 7opennlp-toolsNot affected
Red Hat JBoss Enterprise Application Platform 8opennlp-toolsNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packopennlp-toolsNot affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-40682.

Attack patterns (CAPEC)

  • CAPEC-221 Data Serialization External Entities Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON