Skip to main content
No exploitation reportedFix available

CVE-2026-40682

No exploitation reported by the sources we read.

  • Published2026-05-04
  • Fixed in3.0.0-M3 · 2.5.9 · 1.9.5
  • WeaknessCWE-611

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2026-05-0417:16CVE publishedNVD

Versions per branch

OSV · NVD
Apache opennlp
BranchAffectedFixed in
3.0≥ 3.0.0-M1, < 3.0.0-M33.0.0-M3
2.5< 2.5.92.5.9
2.x≥ 2.0.0, < 2.5.92.5.9
1.9< 1.9.51.9.5
3.0= 3.0.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As apache, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Apache Software Foundation Apache OpenNLPother versions: not affected

    package org.apache.opennlp:opennlp-toolshttps://repo.maven.apache.org/maven2/

    Affected
    • ≥ 2.0, < 2.5.9fixed in 2.5.9semver
    • ≥ 3.0.0-M1, < 3.0.0-M3fixed in 3.0.0-M3semver
    • < 1.9.5fixed in 1.9.5semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-06-30

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • apache-hopChainguardall versions · fixed in 2.17.0-r9and 1 other package
  • apache-opennlpUbuntu:26.10all versions · no fixed version listed
  • apache-opennlpUbuntu:26.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:25.10all versions · no fixed version listed
  • apache-opennlpUbuntu:24.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:22.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:20.04:LTSall versions · no fixed version listed
  • apache-opennlpDebian:14all versions · fixed in 2.5.9-1

7 more package ranges on OSV.dev

Vendor advisories

  • CVE-2026-40682 Red Hat Product Security8 products fixed · 1 known affected

    org.apache.opennlp/opennlp-tools: Apache OpenNLP: XML External Entity (XXE) vulnerability via crafted dictionary parsing

    rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9 as a component of Red Hat OpenShift AI (RHOAI)

  • RHSA-2026:87410 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: RHOAI 2.25.12 - Red Hat OpenShift AI

  • RHSA-2026:84734 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: RHOAI 3.4.5 - Red Hat OpenShift AI

Full record on NVD

Fix

  1. Update Apache opennlp to 3.0.0-M3 · 2.5.9 · 1.9.5
  2. Vendor fix Red Hat Product Security RHSA-2026:87410 · 4 productsFor Red Hat OpenShift AI 2.25.12 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
  3. Vendor fix Red Hat Product Security RHSA-2026:84734 · 4 productsFor Red Hat OpenShift AI 3.4.5 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
  4. Workaround from the vendor Red Hat Product Security RHSA-2026:87410 · 205 productsFor 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.
  5. No fix planned, says the vendor Red Hat Product Security CVE-2026-40682 · 1 productWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • NVDCVE recordread 2026-10-27
  • CISA-ADPSSVC decisionnone2026-05-05
  • CISA-ADPCVSS 3.19.12026-05-05
  • CNACVSS 3.17.5known since 2026-10-27
  • CNAweakness (CWE)CWE-611known since 2026-10-27
  • FIRST EPSSEPSS score0.5 %2026-12-03
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryCritical2026-05-08

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2026-05-04
Last modified
2026-10-26
NVD status
Modified
GitHub advisory
GHSA-4v8g-86x5-3vrc

Frequently asked questions

What is CVE-2026-40682?

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.

Is CVE-2026-40682 actively exploited?

Active exploitation of CVE-2026-40682 has not been confirmed. Its EPSS score was 0.5% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-40682?

CVE-2026-40682 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running opennlp-tools? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record