Skip to content
VulniPulse
High7.5Apache Software Foundation

CVE-2026-42440: Apache OpenNLP: OOM DoS via Unbounded Array Allocation in AbstractModelReader

This Apache advisory covers CVE-2026-42440 in Apache OpenNLP AbstractModelReader.

Open the Apache advisory

Am I affected by CVE-2026-42440?

You are affected if you run Apache OpenNLP AbstractModelReader at one of the versions below. If you do, upgrade to the fixed release listed for your version.

AffectedFixed in
Apache OpenNLP 2.0 before 2.5.92.5.9
Apache OpenNLP 3.0.0-M1 before 3.0.0-M33.0.0-M3
Apache OpenNLP before 1.9.51.9.5

Official advisory · high-confidence parse· fetched ·verify at source

Key facts

Vendor rating
High, CVSS 7.5
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H · base score 7.5, scored by CISA-ADPAttack vector: network. Attack complexity: low. Privileges required: none. User interaction: none. Scope: unchanged. Confidentiality impact: none. Integrity impact: none. Availability impact: high.
Weakness
  • CWE-789: Memory Allocation with Excessive Size Value
EPSS
0.61% chance of exploitation in the next 30 days (50th percentile). FIRST EPSS, .
CISA SSVC
Exploitation: none observed. Automatable: yes. Technical impact: partial. CISA, .
CISA KEV
Not listed (catalogue checked )
Source published
Source revised
Listed by VulniPulse
Record changed

Compiled by VulniPulse from the linked sources. How records are collected and checked.

Affected products & platforms

Apache Software FoundationApache OpenNLP AbstractModelReader

Description

OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader Versions Affected: before 1.9.5 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.

Text from the source record.

How to fix CVE-2026-42440

Upgrade to the first fixed release for your version, shown in the table above.

Vendor guidance

  • 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.

CVE-2026-42440 in other vendors' advisories

Compare every advisory for CVE-2026-42440

CVE-2026-42440 questions

Is CVE-2026-42440 being exploited?

CISA does not list it in its Known Exploited Vulnerabilities catalog (checked ), and the Apache advisory does not report exploitation. That is not proof it is unexploited.

Am I affected by CVE-2026-42440?

You are affected if you run Apache OpenNLP AbstractModelReader at one of the versions below. If you do, upgrade to the fixed release listed for your version. The table above lists each version.

How do I fix CVE-2026-42440?

Upgrade to a fixed release Apache lists for your version: 2.5.9, 3.0.0-M3, 1.9.5. The advisory's own guidance is above.

How likely is CVE-2026-42440 to be exploited?

FIRST's EPSS model gives it a 0.61% chance of exploitation in the next 30 days (50th percentile among scored CVEs, model date ). It is a forecast, not a report of attacks.

How serious is CVE-2026-42440?

Apache rates it high, CVSS 7.5 out of 10.

Apache Software Foundation advisories, May 2026All Apache Software Foundation advisories

Get an email when Apache publishes the next one.

See Apache's last 90 days first. Live alerts for one product are free for life; every vendor is US$10 a month with Pro (first month US$5).

Alert me about Apache