Skip to content

← Actionable
High, CVSS 7.5amended

Apache OpenNLP AbstractModelReader has an OOM Denial of Service via Unbounded Array Allocation

CVE-2026-42440GHSA-659w-93r5-9j6m

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (org.apache.opennlp:opennlp-tools 3.0.0-M3, 2.5.9, 1.9.5), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
  • CVE-2026-42440: 0.60% estimated exploitation activity in the next 30 days; percentile 48.92 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from osv record GHSA-659w-93r5-9j6m

  2. Revision 2 · amended ·

    Amended from ghsa record GHSA-659w-93r5-9j6m

  3. Revision 1 · created ·

    Published from ghsa record GHSA-659w-93r5-9j6m

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-42440

Advisory: Apache OpenNLP AbstractModelReader has an OOM Denial of Service via Unbounded Array Allocation
IDs: CVE-2026-42440, GHSA-659w-93r5-9j6m
Record: https://patchnext.com/advisories/cve-2026-42440 (revision 3, source checked 4 Nov 2026, 06:30 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: org.apache.opennlp:opennlp-tools 3.0.0-M3, 2.5.9, 1.9.5. A vendor fix does not mean a deployment is fixed.

## Affected components
- Maven org.apache.opennlp:opennlp-tools: affected >= 2.0.0, < 2.5.9; >= 3.0.0-M1, < 3.0.0-M3; < 1.9.5; fixed in 3.0.0-M3, 2.5.9, 1.9.5

## Suggested inspection (read-only)
- Maven org.apache.opennlp:opennlp-tools: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on org.apache.opennlp:opennlp-tools.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-659w-93r5-9j6m (GitHub-reviewed advisory GHSA-659w-93r5-9j6m lists affected ranges: Maven org.apache.opennlp:opennlp-tools >=0 =3.0.0-M1 <3.0.0-M3)
- Verified: https://github.com/advisories/GHSA-659w-93r5-9j6m (GitHub-reviewed advisory GHSA-659w-93r5-9j6m lists affected ranges: Maven org.apache.opennlp:opennlp-tools >=3.0.0-M1 =2.0.0 =0 <1.9.5)
- Verified: https://osv.dev/vulnerability/GHSA-659w-93r5-9j6m (OSV record GHSA-659w-93r5-9j6m lists affected ranges: Maven org.apache.opennlp:opennlp-tools >=2.0.0 =3.0.0-M1 =0 <1.9.5 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…