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.
- Published
- May 4, 2026
- Updated
- Jul 30, 2026
- EPSS
- 1.1% · 63th percentile
- CWE
- CWE-789
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
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
| Vendor | Product | CPE |
|---|---|---|
| apache | opennlp | cpe:2.3:a:apache:opennlp |
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.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | apache-opennlp | all versions | — |
| Debian:14 | apache-opennlp | before 2.5.9-1 | 2.5.9-1 |
| Maven | org.apache.opennlp:opennlp-tools | from 3.0.0-M1 · before 3.0.0-M3 | 3.0.0-M3 |
| Maven | org.apache.opennlp:opennlp-tools | before 2.5.9 | 2.5.9 |
| openSUSE:Tumbleweed | opennlp | before 1.9.5-1.1 | 1.9.5-1.1 |
Same product
apache: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-82617Apache OpenNLP, Apache OpenNLP: ReDoS / stack exhaustion in RegexNameFinderFactory built-in EMAIL and URL patterns40Plan
- 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 a40Plan
- CVE-2026-42027Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader39Monitor
- CVE-2026-40682Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor36Monitor
- CVE-2026-43825Apache OpenNLP :: Core :: ML :: LibSVM: Unsafe Java Deserialization in SvmDoccatModel33Monitor
- CVE-2026-67211Apache OpenNLP: OOM DoS via Unbounded Array Allocation in SymSpellModelSerializer30Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Apache Software Foundation Apache OpenNLP | 1.9.5 | Vendor (CNA) |
| Apache Software Foundation Apache OpenNLP | 2.5.9 | Vendor (CNA) |
| Apache Software Foundation Apache OpenNLP | 3.0.0-M3 | Vendor (CNA) |
| debian:apache-opennlp | 2.5.9-1 · Debian:14 | Package registry (OSV) |
| Maven:org.apache.opennlp:opennlp-tools | 2.5.9 | Package registry (OSV) |
| Maven:org.apache.opennlp:opennlp-tools | 3.0.0-M3 | Package registry (OSV) |
| opensuse:opennlp | 1.9.5-1.1 · openSUSE:Tumbleweed | Package 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.
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.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Subramanian Sfinder
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 SymSpellModelSerializer30Monitor
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
Weakness class (CWE)
CWE-789 · Memory Allocation with Excessive Size ValueCVSS 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 helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- lists.apache.org/thread/s8xlkx1gqbxfsq48py5h6jphjvgqp1jo
- www.openwall.com/lists/oss-security/2026/05/01/21
- access.redhat.com/security/cve/CVE-2026-42440
- bugzilla.redhat.com/show_bug.cgi?id=2466494
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42440.json
Vendor advisories and official records. Exploit/PoC links are deliberately left out.