Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted dictionary XML with DOCTYPE
-
DeliveryServer invokes Dictionary(InputStream)
-
ExploitSAX parser resolves external entity
-
ExecutionDisclose local file or SSRF callback
-
ImpactExtract sensitive data from response/logs
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML external entity prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires attacker ability to supply a crafted XML dictionary file to the Dictionary(InputStream) constructor. This condition is met when: (1) applications expose dictionary upload functionality to untrusted users via web forms, REST APIs, or file-processing pipelines; (2) systems load dictionaries from user-controlled directories, network shares, or third-party repositories without integrity verification; or (3) NLP workflows accept serialized Dictionary objects from untrusted sources. Default OpenNLP usage with embedded dictionaries from the opennlp-models JAR is NOT vulnerable as those resources are static and trusted. Exploitation is LIMITED by: no requirement for valid dictionary content structure (XXE triggers during SAX initialization before semantic validation), network reachability from server to attacker-controlled endpoints for SSRF payloads, and file-system permissions for file:// disclosure. Authentication, non-default configuration, and user interaction are NOT required per CVSS vector AV:N/AC:L/PR:N/UI:N. |
| Impact | CVSS 9.1 (AV:N/AC:L/PR:N/UI:N) indicates maximum exploitability: network-accessible, low complexity, no authentication or user interaction required. However, EPSS exploitation probability of 0.03% (8th percentile) suggests minimal observed attacker interest. No CISA KEV listing confirms no active exploitation campaigns. No public POC identified at time of analysis. Real-world risk depends heavily on deployment context: applications accepting dictionary files from untrusted sources (web uploads, third-party integrations) face genuine SSRF and file disclosure risk, while systems using only embedded or administrator-controlled dictionaries have minimal exposure. The inconsistency with XmlUtil.createSaxParser() indicates this is a localized implementation oversight rather than systemic architecture flaw. SSVC factors: Exploitation status = none, Automatable = yes (once attacker controls dictionary input), Technical Impact = partial (confidentiality + integrity via SSRF, no availability impact per CVSS:A:N). Priority for patching should be HIGH for internet-facing NLP services processing user-supplied dictionaries, MEDIUM for internal/trusted-input deployments. The Apache Software Foundation's prompt patch release and detailed advisory increase confidence in remediation path. |
| Exploit ScenarioDerived | Attacker identifies an NLP-powered web service allowing users to upload custom stop-word dictionaries for text classification. They craft a malicious XML dictionary file containing a DOCTYPE declaration with file:// entity reference to /etc/passwd or http:// reference to internal metadata service (169.254.169.254). When the service invokes new Dictionary(maliciousInputStream) to load the dictionary, the SAX parser resolves external entities before processing entries, returning file contents in parser error messages or triggering SSRF requests observable via callback server. Public exploit code exists for generic XXE attacks in Java SAX parsers; adaptation to OpenNLP's Dictionary API requires only supplying the DOCTYPE-laden XML to the documented constructor. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
XML External Entity injection in Apache OpenNLP's DictionaryEntryPersistor allows remote unauthenticated attackers to disclose local files or perform server-side request forgery when processing untrusted dictionary files. The vulnerable SAX parser initialization omits critical security features (FEATURE_SECURE_PROCESSING, DTD disablement) present elsewhere in the codebase, creating an inconsistency exploitable via the public Dictionary(InputStream) API when loading stop-word lists or domain dictionaries. With EPSS at 0.03% (8th percentile) and no active exploitation reported, this represents a code-quality issue in a specific input path rather than an imminent widespread threat, though the CVSS 9.1 reflects maximum theoretical impact given the network-accessible, unauthenticated attack vector.
RemediationAI
Vendor-released patches: Apache OpenNLP 2.5.9 for 2.x users and 3.0.0-M3 for 3.x users eliminate the vulnerability by correctly configuring SAX parser security features in DictionaryEntryPersistor. Download from official Apache distribution channels and verify release signatures per Apache security procedures (https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6). For users unable to upgrade immediately, implement pre-parse input validation rejecting any XML containing DOCTYPE declarations before passing to Dictionary(InputStream) constructor. Example compensating control: wrap InputStream in filtering layer that scans first 2KB for '<!DOCTYPE' substring and rejects if present (trade-off: potential false positives with legitimate comments, adds parsing overhead, does not protect against future XML injection variants). Stronger alternative: restrict dictionary file sources to administrator-controlled file paths with integrity verification via cryptographic signatures, preventing untrusted input from reaching the parser entirely (trade-off: reduces flexibility for dynamic dictionary loading in multi-tenant environments). Temporary workaround does not address root cause and should be replaced with vendor patch within standard change-control windows.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in maven, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Apache OpenNLP is a natural language processing toolkit. The DictionaryEntryPersistor class uses Java's SAXParserFactory for XML parsing but fails to configure XXE protections at class initialization. Standard XXE defenses require setting FEATURE_SECURE_PROCESSING (javax.xml.XMLConstants) and explicitly disabling external general entities, external parameter entities, and DOCTYPE declarations. OpenNLP's own XmlUtil.createSaxParser() helper implements these protections correctly and is used throughout the codebase, but DictionaryEntryPersistor bypasses it with a static factory that only enables namespace support. This creates CWE-611 (Improper Restriction of XML External Entity Reference) where malicious DOCTYPE declarations in dictionary files trigger entity expansion during SAX parsing. The affected component is cpe:2.3:a:apache_software_foundation:apache_opennlp across 2.x (pre-2.5.9) and 3.x (pre-3.0.0-M3) branches. Dictionary files are XML-formatted resources commonly loaded from user-controlled sources in NLP workflows, making untrusted input a realistic threat model.
Know when Apache Opennlp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Primary rating from Vendor (apache).
CVSS VectorVendor: apache
Lifecycle Timeline
4DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 27 maven packages depend on org.apache.opennlp:opennlp-tools (10 direct, 17 indirect)
Ecosystem-wide dependent count for version 2.0.0.
Executive ViewAI
Apache OpenNLP contains a critical XML External Entity (XXE) injection vulnerability in its dictionary processing component that could allow unauthenticated attackers to read sensitive files or perform server-side request forgery when the application loads untrusted dictionary files. Organizations using OpenNLP for natural language processing should prioritize patching, as the vulnerability is network-accessible and requires no authentication, though current exploitation likelihood remains low.
Apply vendor patch. If immediate patching is not feasible: (1) Restrict dictionary file loading to pre-validated, internally-sourced files only; (2) Disable external entity resolution in XML processors application-wide; (3) Implement network segmentation to limit OpenNLP instances' outbound connectivity; (4) Monitor for unexpected file access or DNS queries from OpenNLP processes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
XML External Entity (XXE) attacks exploit XML parsers that process Document Type Definitions (DTDs) without proper restrictions.
More in Apache Opennlp
View allDenial of service in Apache OpenNLP 2.0.0 through 2.5.11 and 3.0.0-M1 through 3.0.0-M5 lets a remote unauthenticated att
Apache OpenNLP's model loading mechanism executes arbitrary static initializers through crafted manifest entries, enabli
Untrusted Java deserialization in Apache OpenNLP's SvmDoccatModel (libsvm document categorization module, versions 3.0.0
SymSpellModelSerializer in Apache OpenNLP 3.0.0-M4 and 3.0.0-M5 crashes the host JVM with an OutOfMemoryError when deser
Remote denial of service in Apache OpenNLP versions before 2.5.9 and 3.0.0-M3 allows unauthenticated attackers to crash
Limited code execution risk in Apache OpenNLP through crafted model archives or untrusted format names permits arbitrary
EUVD-2026-27003
GHSA-4v8g-86x5-3vrc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB