Skip to content
Noroxi
CVE-2026-42440· NVD / CVE Program· CNA apache

Apache OpenNLP: OOM DoS via Unbounded Array Allocation in AbstractModelReader

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.

HighCVSS 7.5 · v3.1—No exploit Fix available
Published
May 4, 2026
Updated
Jul 30, 2026
EPSS
1.1% · 63th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

30

Monitor

Low priority for now.

CVSS
30 / 40 · 7.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 1.1%

CISA SSVC decision

Exploitation
none
Automatable
yes
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

Affected systems

VendorProduct
apacheopennlp

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • apache opennlpbefore 2.5.9
  • apache opennlp3.0.0

Versions reported by the vendor

Affected version ranges reported by the assigning authority (apache). Independent of NVD's CPE analysis and usually ahead of it.

  • Apache Software Foundation Apache OpenNLP

    • 2.0 and later · before 2.5.9affected · semver
    • 3.0.0-M1 and later · before 3.0.0-M3affected · semver
    • before 1.9.5affected · semver

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12apache-opennlpall versions—
Debian:14apache-opennlpbefore 2.5.9-12.5.9-1
Mavenorg.apache.opennlp:opennlp-toolsfrom 3.0.0-M1 · before 3.0.0-M33.0.0-M3
Mavenorg.apache.opennlp:opennlp-toolsbefore 2.5.92.5.9
openSUSE:Tumbleweedopennlpbefore 1.9.5-1.11.9.5-1.1

Other highest-scoring records for the same primary product.

  • CVE-2026-82617Apache OpenNLP, Apache OpenNLP: ReDoS / stack exhaustion in RegexNameFinderFactory built-in EMAIL and URL patterns
    40Plan
  • CVE-2017-12620When loading models or dictionaries that contain XML it is possible to perform an XXE attack, since Apache OpenNLP is a library, this only a
    40Plan
  • CVE-2026-42027Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader
    39Monitor
  • CVE-2026-40682Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
    36Monitor
  • CVE-2026-43825Apache OpenNLP :: Core :: ML :: LibSVM: Unsafe Java Deserialization in SvmDoccatModel
    33Monitor
  • CVE-2026-67211Apache OpenNLP: OOM DoS via Unbounded Array Allocation in SymSpellModelSerializer
    30Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Apache Software Foundation Apache OpenNLP1.9.5Vendor (CNA)
Apache Software Foundation Apache OpenNLP2.5.9Vendor (CNA)
Apache Software Foundation Apache OpenNLP3.0.0-M3Vendor (CNA)
debian:apache-opennlp2.5.9-1 · Debian:14Package registry (OSV)
Maven:org.apache.opennlp:opennlp-tools2.5.9Package registry (OSV)
Maven:org.apache.opennlp:opennlp-tools3.0.0-M3Package registry (OSV)
opensuse:opennlp1.9.5-1.1 · openSUSE:TumbleweedPackage registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • CVE-2026-67211130 days apartApache OpenNLP: OOM DoS via Unbounded Array Allocation in SymSpellModelSerializer
    30Monitor

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
none
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
None
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

nvd-secondary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records