NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
HIGH severity

CVE-2026-42440 — opennlp-tools

HIGHFix: apache/opennlp#1198

CVE-2026-42440 is a high-severity (CVSS 7.5) CWE-789 vulnerability in org.apache.opennlp:opennlp-tools. A fix is available for org.apache.opennlp:opennlp-tools — see the affected versions and patch details below.

Apache OpenNLP: OOM DoS via Unbounded Array Allocation in AbstractModelReader

Also known asGHSA-659w-93r5-9j6m
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Nov 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-42440.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs49th percentile — riskier than 49% of all scored CVEsHighest risk
0.00%0.52%1.04%1.57%0.2%0.6%Jun 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
☕org.apache.opennlp:opennlp-tools☕org.apache.opennlp:opennlp-tools☕org.apache.opennlp:opennlp-tools

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

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

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenorg.apache.opennlp:opennlp-tools≥ 2.0.0&&< 2.5.92.5.9org.apache.opennlp:opennlp-tools:2.5.9
☕Mavenorg.apache.opennlp:opennlp-tools≥ 3.0.0-M1&&< 3.0.0-M33.0.0-M3org.apache.opennlp:opennlp-tools:3.0.0-M3
☕Mavenorg.apache.opennlp:opennlp-toolsall versions1.9.5org.apache.opennlp:opennlp-tools:1.9.5

Affected Products

1 product · 3 configurations
Application
opennlpapache
< 2.5.9
1 version
3.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.opennlp:opennlp-tools, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update org.apache.opennlp:opennlp-tools to 2.5.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-42440 is resolved across your whole dependency graph.

  3. Workarounds

    Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

Apache's advisory rates this vulnerability Moderate. Red Hat rates it Important (CVSS v3.1 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). In an affected deployment, a remote unauthenticated attacker can cause a denial of service if the application loads a crafted OpenNLP binary model. An attacker-controlled count can…

Workaround published by Red Hat
Until the applicable fix is installed, load OpenNLP binary model files only from trusted sources and verify their provenance and integrity. Do not load models supplied by end users or third-party repositories unless they have been verified. Upstream fixes are available in OpenNLP 2.5.9 or later in the 2.x line and 3.0.0-M3 or later in the 3.x line. For Red Hat products, use the fixed package applicable to the product stream, as Red Hat may backport the fix.
Source: Red Hat security advisory for CVE-2026-42440 (CC BY 4.0)

Frequently Asked Questions

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 mo
O3 Security · Impact-Aware SCA

Is CVE-2026-42440 in your dependencies?

Find it across Maven, including transitive dependencies.

CVE-2026-42440: opennlp-tools DoS — Fixed in 2.5.9