Skip to content
VulniPulse
Critical 2 vendors · 2 advisories

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

CVE-2026-40682 key facts

CISA KEV
Not listed (catalogue checked )
Highest advisory rating
Critical
CVSS base score
9.1 (Apache), 7.5 (Red Hat)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N · base score 9.1, scored by CISA-ADPAttack vector: network. Attack complexity: low. Privileges required: none. User interaction: none. Scope: unchanged. Confidentiality impact: high. Integrity impact: high. Availability impact: none.
Weakness
  • CWE-611 Improper Restriction of XML External Entity Reference
EPSS
0.51% chance of exploitation in the next 30 days (45th percentile). FIRST EPSS, .
CISA SSVC
Exploitation: none observed. Automatable: yes. Technical impact: total. CISA, .
Fixed releases
  • Apache: 2.5.9, 3.0.0-M3, 1.9.5
Vendor advisories
2 from Apache, Red Hat
Assigned by
apache (CNA)
CVE record published
Listed by VulniPulse
Record changed

Ratings, versions and fixes are quoted from the vendor advisories that cover only CVE-2026-40682; each belongs to its advisory, not to every product listed. How records are collected and checked.

Am I affected by CVE-2026-40682?

You are affected if you run Apache OpenNLP DictionaryEntryPersistor at one of the versions below. If you do, upgrade to the fixed release listed for your version.

AffectedFixed in
Apache: Apache OpenNLP 2.0 before 2.5.92.5.9
Apache: Apache OpenNLP 3.0.0-M1 before 3.0.0-M33.0.0-M3
Apache: Apache OpenNLP before 1.9.51.9.5

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.

Text from the CVE.org record (apache).

How do I fix CVE-2026-40682?

Upgrade to a fixed release named by the vendor:

  • Apache: 2.5.9, 3.0.0-M3, 1.9.5
  • Mitigation: 2.x users should upgrade to 2.5.9. (Apache)
  • x users should upgrade to 3.0.0-M3. (Apache)
  • Red Hat rates this important; a fix erratum may not be out yet — apply the RHSA as soon as it publishes. (Red Hat)

Vendor advisories for CVE-2026-40682

Apache

1 advisory
  • Advisory severityCritical9.1

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

    CVE-2026-40682Source published Source updated

    XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP DictionaryEntryPersistor Versions Affected: before 2.5.9, before 3.0.0-M3 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…

    Affected products in this advisory
    • Apache OpenNLP DictionaryEntryPersistor
    Source-reported affected versions
    • Apache OpenNLP 2.0 before 2.5.9
    • Apache OpenNLP 3.0.0-M1 before 3.0.0-M3
    • Apache OpenNLP before 1.9.5
    Source-reported fixed versions
    • 2.5.9
    • 3.0.0-M3
    • 1.9.5
    Mitigation guidance
    • Mitigation: 2.x users should upgrade to 2.5.9.
    • 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.

Red Hat

1 advisory
  • Advisory severityHigh7.5

    High [CVE-2026-40682] XML External Entity (XXE) vulnerability via crafted dictionary parsing

    CVE-2026-40682Source published

    XML External Entity (XXE) vulnerability via crafted dictionary parsing. Red Hat rates this important (CVSS 7.5). Weakness: CWE-611. No fix erratum has been published yet; monitor the Red Hat CVE page and apply the RHSA when released.

    Affected products in this advisory
    • Red Hat OpenShift AI (RHOAI)
    Source-reported affected versions
    Affected-version details not available in this record.
    Source-reported fixed versions
    No fixed-version detail extracted. This does not mean no fix exists.
    Mitigation guidance
    • Red Hat rates this important; a fix erratum may not be out yet — apply the RHSA as soon as it publishes.

References

Timeline

  1. First vendor advisory listed by VulniPulse
  2. CVE record published
  3. CVE record last updated

All Apache advisories

Get an email when Apache publishes the next one.

See Apache's last 90 days first. Live alerts for one product are free for life; every vendor is US$10 a month with Pro (first month US$5).

Alert me about Apache