Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 63%

CVE-2026-42440: CWE-789: Memory Allocation with Excessive Size Value in Apache Software Foundation Apache OpenNLP

0
High
VulnerabilityCVE-2026-42440cvecve-2026-42440cwe-789
Published: Mon May 04 2026 (05/04/2026, 16:40:32 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache OpenNLP

Description

CVE-2026-42440 is a high-severity vulnerability in Apache OpenNLP versions before 2.5.9 and before 3.0.0-M3. It involves unbounded memory allocation during deserialization of . bin model files, where attacker-controlled count fields are used directly to allocate arrays without validation. This can cause an OutOfMemoryError and crash the Java Virtual Machine loading the model, resulting in a denial of service. The issue affects any code path that loads . bin models from untrusted sources.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

Affected versions
=0=3.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/12/2026, 06:25:51 UTC

Technical Analysis

The vulnerability arises from AbstractModelReader methods (getOutcomes(), getOutcomePatterns(), getPredicates()) reading 32-bit signed integer counts from a binary model stream and using these values directly for array allocations without validating their size or sign. An attacker can craft a .bin model file with extremely large count values (e.g., Integer.MAX_VALUE) to trigger an OutOfMemoryError early in deserialization, causing denial of service. The flaw affects Apache OpenNLP versions before 2.5.9 and 3.0.0-M3. The fix introduces an upper bound (default 10,000,000) on these counts, throwing an IllegalArgumentException if exceeded, preventing large allocations. Users can configure this limit via the OPENNLP_MAX_ENTRIES system property if needed.

Potential Impact

This vulnerability allows an attacker to cause a denial of service by crashing the JVM process that loads a maliciously crafted .bin model file. There is no impact on confidentiality or integrity, only availability is affected. The denial of service occurs early in the model deserialization process and can be triggered by a small crafted file, making it practical for attackers to disrupt services that load untrusted or semi-trusted models.

Mitigation Recommendations

Fixed versions are available: users of Apache OpenNLP 2.x should upgrade to version 2.5.9 or later, and users of 3.x should upgrade to 3.0.0-M3 or later. The fix enforces upper bounds on array allocation sizes to prevent heap exhaustion. Deployments that cannot upgrade immediately should treat all .bin model files as untrusted input unless their provenance is verified and avoid loading models from untrusted or third-party sources without integrity checks. The vendor advisory does not indicate any temporary fixes or that no action is required.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
apache
Date Reserved
2026-04-27T12:43:14.347Z
Cvss Version
null
State
PUBLISHED
Remediation Level
null

Threat ID: 69f8d219cbff5d86103970b3

Added to database: 5/4/2026, 5:06:33 PM

Last enriched: 5/12/2026, 6:25:51 AM

Last updated: 6/18/2026, 4:41:20 AM

Views: 80

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses