CVE-2026-42440
published high CVSS 3.1 · 7.5Apache OpenNLP: OOM DoS via Unbounded Array Allocation in AbstractModelReader
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Apache Software Foundation | — | org.apache.opennlp:opennlp-toolsApache OpenNLP · 2.0 to < 2.5.9 · 3.0.0-M1 to < 3.0.0-M3 · 0 to < 1.9.5 · Other versions: unaffected | Affected | Not stated | apache |
| Red Hat | — | opennlp-toolsRed Hat Data Grid 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | opennlp-maxentRed Hat Fuse 7 | Affected | Not stated | redhat-SADP |
| Red Hat | — | opennlp-toolsRed Hat Fuse 7 | Affected | Not stated | redhat-SADP |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolss390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-toolsx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
Show 16 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Red Hat | — | opennlp-toolsRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | rhoai/odh-trustyai-service-rhel8Red Hat OpenShift AI (RHOAI) | Unknown | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-trustyai-service-rhel9Red Hat OpenShift AI (RHOAI) | Unknown | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9Red Hat OpenShift AI (RHOAI) | Unknown | Not stated | redhat-SADP |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlps390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlpx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonppc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addons390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-morfologik-addonx86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimaaarch64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimappc64le | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimas390x | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | opennlp-uimax86_64 | Advisory build | 1.9.5-1.1 | OPENSUSE-SU-2026:11281-1 |
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.
A flaw was found in Apache OpenNLP. A remote attacker can exploit this vulnerability by providing a specially crafted binary model (.bin) file. This file contains an excessively large count field, which leads to an unbounded array allocation and triggers an OutOfMemoryError. Successful exploitation results in a Denial of Service (DoS) against any process that attempts to load the malicious model file.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- redhat-SADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | CISA-ADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Apache Software Foundation | Apache OpenNLP | 2.0 to < 2.5.9 (affected · semver)3.0.0-M1 to < 3.0.0-M3 (affected · semver)0 to < 1.9.5 (affected · semver)Default: unaffected | apache · cna |
| Red Hat | Red Hat Data Grid 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Fuse 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Fuse 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unknown | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unknown | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unknown | redhat-SADP · adp |
Weaknesses
2- CWE-789 CWE-789: Memory Allocation with Excessive Size Value
- CWE-770 Allocation of Resources Without Limits or Throttling
References
5- http://www.openwall.com/lists/oss-security/2026/05/01/21
- https://access.redhat.com/security/cve/CVE-2026-42440
- RHBZ#2466494 https://bugzilla.redhat.com/show_bug.cgi?id=2466494
- https://lists.apache.org/thread/s8xlkx1gqbxfsq48py5h6jphjvgqp1jo
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42440.json
Provider assertions
4apache · cna
Apache OpenNLP: OOM DoS via Unbounded Array Allocation in AbstractModelReader
redhat-SADP · adp
org.apache.opennlp/opennlp-tools: Apache OpenNLP: Denial of Service via unbounded array allocation in crafted model files
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 192100879f765a7fd0f1a2893f050b3da7375aef3075c9d95a70daa8544b4e26
- Ingested
- 23 Sep 2026, 09:14:19 UTC
- Source record
- Official CVE record