ADVISORIES

Vulnerability

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.

21 advisories report this vulnerability, across 6 ecosystems.

Advisories

  • CGA-4g9q-j2vh-c462
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-4gpx-7g2q-qph5
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-59r2-fch3-2pqp
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-95mj-j9g3-9qr3
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-9754-jfwx-4qfr
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-c5fj-q9h7-2926
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-g7v3-6p86-jp77
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-h7v2-x6hp-6jv2
    CVE-2026-40682 ChainguardWolfi Updated 5 November 2026
  • CGA-hvpj-m3xp-ff8x
    CVE-2026-40682 ChainguardWolfi Updated 5 November 2026
  • CGA-j93j-wpx7-q4jx
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-m23r-4qmc-phvh
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-m29v-pxqh-3wmq
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-p385-h32w-c2qf
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-q247-329v-wmr9
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-r6rr-mcw9-84xh
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-vrj5-hc5c-2m62
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • CGA-wpmx-hp9f-jj7c
    CVE-2026-40682 Chainguard Updated 5 November 2026
  • DEBIAN-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…

    CVE-2026-40682 Debian Updated 27 October 2026
  • GHSA-4v8g-86x5-3vrc

    Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing

    Critical CVE-2026-40682 Maven Updated 2 October 2026
  • UBUNTU-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…

    CVE-2026-40682 Ubuntu Updated 17 October 2026
  • openSUSE-SU-2026:11281-1

    opennlp-1.9.5-1.1 on GA media

    CVE-2017-12620CVE-2026-40682CVE-2026-42027CVE-2026-42440 openSUSE Updated 16 July 2026

References