Skip to main content

Apache OpenNLP EUVDEUVD-2026-27031

| CVE-2026-42440 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-05-04 apache GHSA-659w-93r5-9j6m
7.5
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

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

  1. Access
    Upload crafted .bin model file
  2. Delivery
    Application initiates model deserialization
  3. Exploit
    AbstractModelReader reads malicious count field
  4. Execution
    JVM attempts multi-gigabyte array allocation
  5. Persist
    OutOfMemoryError crashes process
  6. Impact
    Service denial

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Exploitation requires that the target application deserialize Apache OpenNLP binary model files (.bin format) from sources that accept attacker-controlled input. Specifically, the vulnerable code path is reached when any application calls GenericModelReader or higher-level model-loading APIs (e.g., TokenizerModel, POSModel constructors accepting InputStream or File) against a crafted .bin file where the numOutcomes, numOCTypes, or NUM_PREDS count field is set to a value causing heap exhaustion. This is most common in deployments that: allow end users to upload custom models (ML-as-a-Service platforms, AutoML tools), fetch models from third-party repositories without integrity verification, or process models from untrusted network sources. The vulnerability does NOT require authentication (PR:N), user interaction beyond initiating model load (UI:N), or non-default configurations-any installation of affected OpenNLP versions loading untrusted .bin files is vulnerable. Limiting factors: Applications that load only vendor-signed models from hardcoded paths, deployments with strict allow-lists for model sources, or environments using older serialization formats instead of .bin are not affected.

Impact

CVSS 7.5 (High) accurately reflects the technical severity: network-accessible (AV:N), low complexity (AC:L), no privileges required (PR:N), and high availability impact (A:H). However, real-world exploitability is constrained by the requirement that victim applications must deserialize model files from attacker-controlled or semi-trusted sources-a deployment pattern common in ML-as-a-Service platforms, model marketplaces, or user-uploaded training pipelines, but less prevalent than typical web vulnerabilities. The EPSS score of 0.02% (5th percentile) aligns with this assessment: while technically trivial to exploit, the attack surface is narrower than remote code execution or authentication bypass flaws. No CISA KEV listing and no public POC identified, indicating no confirmed active exploitation. SSVC decision tree: exploitation status is none, automatable is yes (trivial file upload), technical impact is partial (DoS only, not RCE). Priority should be medium for organizations exposing OpenNLP model-loading endpoints to untrusted input, low for isolated research environments. The fix introduces a sensible 10-million entry default cap with override capability, balancing security and legitimate use cases. Deployments that cannot patch immediately face operational risk if they accept model files from third parties or end users without cryptographic integrity verification.

Exploit ScenarioDerived

An attacker targeting an ML model marketplace crafts a malicious .bin file by modifying the numOutcomes count field in the binary header to 2,147,483,647 (Integer.MAX_VALUE), resulting in a file size under 1 KB. They upload this file to a public model repository or submit it via an API endpoint that allows custom model uploads. When a victim application attempts to load the model-either automatically as part of a scheduled retraining pipeline or on-demand when a user selects the model-the AbstractModelReader.getOutcomes() method reads the weaponized count and attempts to allocate a String array of ~2 billion elements, immediately exhausting the JVM heap and crashing the service with OutOfMemoryError. No public POC code has been identified, but the attack is trivial to execute given the detailed disclosure in the vendor advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
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

Remote denial of service in Apache OpenNLP versions before 2.5.9 and 3.0.0-M3 allows unauthenticated attackers to crash JVM processes by uploading malicious .bin model files that trigger OutOfMemoryError through unbounded array allocation. Exploitation requires no authentication (AV:N/AC:L/PR:N) and affects any code path deserializing binary model files from untrusted sources. EPSS score of 0.02% (5th percentile) suggests low widespread exploitation risk, and no active exploitation or public POC has been identified at time of analysis. Vendor-released patches are available with default safeguards limiting count fields to 10 million entries.

RemediationAI

Upgrade to Apache OpenNLP 2.5.9 for 2.x deployments or 3.0.0-M3 for 3.x deployments. Both releases implement pre-allocation validation that rejects negative counts or values exceeding 10 million entries (default bound), throwing IllegalArgumentException before heap allocation occurs. Deployments with legitimate models exceeding 10 million entries can raise the limit via JVM system property: -DOPENNLP_MAX_ENTRIES=50000000. For environments unable to upgrade immediately, implement strict input validation: accept model files only from cryptographically signed sources or vendor-trusted repositories, verify file integrity using SHA-256 checksums published by model authors, and isolate model-loading processes in containers with heap limits (e.g., docker run -m 512m) to prevent JVM crashes from cascading to other services-though this only limits blast radius and does not prevent DoS of the isolated process. Do not expose model upload endpoints to unauthenticated users or load models from user-generated content platforms without sandboxing. Advisory and patches available at https://lists.apache.org/thread/s8xlkx1gqbxfsq48py5h6jphjvgqp1jo.

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 library that deserializes machine learning models from binary .bin files. The vulnerability resides in AbstractModelReader's deserialization methods (getOutcomes(), getOutcomePatterns(), getPredicates()), which read 32-bit signed integer count fields from the binary stream and directly allocate Java arrays (new String[count], new int[count][]) without bounds validation. This is a classic instance of CWE-789 (Memory Allocation with Excessive Size Value), where attacker-controlled input dictates heap allocation size. The count field can be set to Integer.MAX_VALUE (2,147,483,647), causing immediate heap exhaustion before any actual data is consumed. Because the vulnerable code executes early in the deserialization sequence-after reading only the model-type string and correction parameters in GIS models-attackers can craft tiny malicious files with devastating impact. The affected CPE (cpe:2.3:a:apache_software_foundation:apache_opennlp) covers all 2.x releases before 2.5.9 and 3.0.0 milestones before M3.

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 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH
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
None
Integrity
None
Availability
High

Lifecycle Timeline

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

DescriptionCVE.org

OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader

Versions Affected:

before 2.5.9

before 3.0.0-M3

Description:

The AbstractModelReader methods getOutcomes(), getOutcomePatterns(), and getPredicates() each read a 32-bit signed integer count field from a binary model stream and pass that value directly to an array allocation (new String[numOutcomes], new int[numOCTypes][], new String[NUM_PREDS]) without validating that the value is non-negative or within a reasonable bound. The count is therefore fully attacker-controlled when the model file originates from an untrusted source.

A crafted .bin model file in which any of these count fields is set to Integer.MAX_VALUE (or any value large enough to exhaust the available heap) triggers an OutOfMemoryError at the array allocation itself, before the corresponding label or pattern data is consumed from the stream. The error occurs very early in deserialization: for a GIS model, getOutcomes() is reached after only the model-type string, the correction constant, and the correction parameter have been read; so the attacker pays no meaningful size cost to weaponize a payload, and a single small file can crash a JVM that loads it. Any code path that deserializes a .bin model is affected, including direct use of GenericModelReader and any higher-level component that delegates to it during model load.

The practical impact is denial of service against processes that load model files from untrusted or semi-trusted origins.

Mitigation:

  • 2.x users should upgrade to 2.5.9.
  • 3.x users should upgrade to 3.0.0-M3.

Note: The fix introduces an upper bound on each of the three count fields, checked before array allocation; counts that are negative or exceed the bound cause an IllegalArgumentException to be thrown and the read to fail fast with no large allocation. The default bound is 10,000,000, which is well above the entry counts of legitimate OpenNLP models but far below any value that would threaten heap exhaustion. Deployments that legitimately need to load models with more entries than the default can raise the limit at JVM startup by setting the OPENNLP_MAX_ENTRIES system property to the desired positive integer (e.g. -DOPENNLP_MAX_ENTRIES=50000000); invalid or non-positive values fall back to the default.

Users who cannot upgrade immediately should treat all .bin model files as untrusted input unless their provenance is verified, and should avoid loading models supplied by end users or fetched from third-party repositories without integrity checks.

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 versions before 2.5.9 and 3.0.0-M3 contain a remote denial-of-service vulnerability that allows unauthenticated attackers to crash JVM processes by uploading malicious model files. Organizations using OpenNLP for natural language processing should prioritize patching to prevent service disruptions, as the vulnerability requires no authentication and can be exploited over the network.

Business Impact: High
Compensating Controls

Apply vendor patch. Until patching is complete, restrict network access to OpenNLP services using firewall rules and disable untrusted model file uploads; implement input validation to reject .bin files from non-authenticated sources where feasible.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% 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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Partial

Priority Score

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

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: High

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