GHSA-4v8g-86x5-3vrc

Suggest an improvement
Source
https://github.com/advisories/GHSA-4v8g-86x5-3vrc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-4v8g-86x5-3vrc/GHSA-4v8g-86x5-3vrc.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4v8g-86x5-3vrc
Aliases
Downstream
CGA (17)
Published
2026-05-04T18:30:30Z
Modified
2026-09-10T03:50:45Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-611"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-05-08T17:51:59Z",
    "nvd_published_at":  "2026-05-04T17:16:23Z",
    "severity":  "CRITICAL"
}
References

Affected packages

Maven / org.apache.opennlp:opennlp-tools

Package

Name
org.apache.opennlp:opennlp-tools
View open source insights on deps.dev
Purl
pkg:maven/org.apache.opennlp/opennlp-tools

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.5.9

Affected versions

1.*
1.5.1-incubating
1.5.2-incubating
1.5.3
1.6.0
1.7.0
1.7.1
1.7.2
1.8.0
1.8.1
1.8.2
1.8.3
1.8.4
1.9.0
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
2.*
2.0.0
2.1.0
2.1.1
2.2.0
2.3.0
2.3.1
2.3.2
2.3.3
2.4.0
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.6.1
2.5.7
2.5.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-4v8g-86x5-3vrc/GHSA-4v8g-86x5-3vrc.json"

Maven / org.apache.opennlp:opennlp-tools

Package

Name
org.apache.opennlp:opennlp-tools
View open source insights on deps.dev
Purl
pkg:maven/org.apache.opennlp/opennlp-tools

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0-M1
Fixed
3.0.0-M3

Affected versions

3.*
3.0.0-M1
3.0.0-M2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-4v8g-86x5-3vrc/GHSA-4v8g-86x5-3vrc.json"