CVE-2026-42440
Last modified
CVE-2026-42440 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. 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. EPSS estimates a 0.60% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Apache | Opennlp | < 2.5.9 | — |
| Apache | Opennlp | 3.0.0 | M1 |
References
- https://lists.apache.org/thread/s8xlkx1gqbxfsq48py5h6jphjvgqp1joMailing List, Vendor Advisory
- http://www.openwall.com/lists/oss-security/2026/05/01/21Mailing List, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-42440?
How severe is CVE-2026-42440?
How do I fix CVE-2026-42440?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-42434OpenClaw versions 2026.4.5 before 2026.4.10 contain a sandbo…8.8
- CVE-2026-42435OpenClaw versions from 2026.2.22 before 2026.4.12 contain an…8.8
- CVE-2026-42436OpenClaw before 2026.4.14 contains an improper access contro…7.7
- CVE-2026-42437OpenClaw versions 2026.4.9 before 2026.4.10 contain a denial…8.2
- CVE-2026-42438OpenClaw versions 2026.4.9 before 2026.4.10 contain a sender…7.7
- CVE-2026-42439OpenClaw before 2026.4.10 contains a server-side request for…8.5
- CVE-2026-42442NanaZip is an open source file archive. From 5.0.1252.0 to b…5.5
- CVE-2026-42443NanaZip is an open source file archive. From 5.0.1252.0 to b…5.5
- CVE-2026-42444NanaZip is an open source file archive. From 5.0.1252.0 to b…5.5
- CVE-2026-42445NanaZip is an open source file archive. From 5.0.1252.0 to b…5.5
- CVE-2026-42446NanaZip is an open source file archive. From 5.0.1252.0 to b…7.1
- CVE-2026-42447jadx is a Dex to Java decompiler. Prior to 1.5.6, jadx-gui i…5
Are you affected by CVE-2026-42440?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
