Skip to main content

Apache OpenNLP EUVDEUVD-2026-27003

| CVE-2026-40682 CRITICAL
Improper Restriction of XML External Entity Reference (CWE-611)
2026-05-04 apache GHSA-4v8g-86x5-3vrc
9.1
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Upload crafted dictionary XML with DOCTYPE
  2. Delivery
    Server invokes Dictionary(InputStream)
  3. Exploit
    SAX parser resolves external entity
  4. Execution
    Disclose local file or SSRF callback
  5. Impact
    Extract 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Apache OpenNLP 0 <2.5.9
Apache OpenNLP 3.0 <3.0.0-M3

Affected Packages

maven org.apache.opennlp:opennlp-tools fix: 1.9.5, 2.5.9, 3.0.0-M3
euvd apache_opennlp fix: 2.5.9, 3.0.0-M3

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

Vendor (apache) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
SUSE CRITICAL
Red Hat 7.5 HIGH

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

4
CVSS changed
May 05, 2026 - 16:22 NVD
9.1 (CRITICAL)
Patch available
May 04, 2026 - 18:32 EUVD
Patch released
May 04, 2026 - 18:16 nvd
Patch available
CVE Published
May 04, 2026 - 16:55 nvd
N/A

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Vendor StatusVendor

SUSE

Severity: Critical

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy