9.1

CVE-2026-40682: Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor

Modified
AliasesUBUNTU-CVE-2026-40682DEBIAN-CVE-2026-40682CGA-h7v2-x6hp-6jv2
Published 04-05-2026Last modified 02-09-2026

Vulnerability summary

CVE-2026-40682 is a critical (CVSS 9.1) vulnerability in apache software foundation apache opennlp. EPSS estimates a 0.50% chance of exploitation in the next 30 days, higher than 43.4% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 9.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 20-11-2026)

Source freshness unavailable

How is this decided?
CVSS score
9.1/10
010
Critical · v3.1 (CVE.org)
EPSS score
0.50%
0%100%
Low · -0.35 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 2

Timeline

  1. 04-05-2026
    PublishedVulnerability first disclosed.
  2. 02-09-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.50%

Chance of exploitation in the next 30 days

Percentile

43%

Versus all other CVEs

30-day change

Decrease -0.35 pp

From 0.84% on 21-10-2026

21-10-202620-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard5 products
  • apache-hop< 2.17.0-r9
  • apache-hop-fips< 2.17.0-r9
  • solr-9-full< 9.10.1-r17
  • solr-fips-9-full< 9.10.1-r6
  • thingsboard-tb-node< 4.3.1.1-r7
Apache1 product
  • opennlp< 2.5.9 | 3.0.0:m1 | 3.0.0:m2
Apache software foundation1 product
Debian1 product
  • apache-opennlpAll versions (No fix recorded) | < 2.5.9-1
Org.apache.opennlp1 product
  • opennlp-tools≥ 2.0.0, < 2.5.9 | ≥ 3.0.0-M1, < 3.0.0-M3 | < 1.9.5
Ubuntu1 product
  • apache-opennlpAll versions (No fix recorded)
Wolfi1 product
  • thingsboard-tb-node< 4.3.1.1-r7

7 vendors · 11 products

References

16 links
Show all 16 references