Skip to main content

Apache OpenNLP EUVDEUVD-2026-76167

| CVE-2026-67211 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-09-11 apache GHSA-gr8h-7qg5-vh27
7.5
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted .bin model with unigramCount = Integer.MAX_VALUE
  2. Delivery
    Deliver to any SymSpell deserialization path
  3. Exploit
    SymSpellModelSerializer.create() reads count, skips upper-bound check
  4. Execution
    LinkedHashMap.newLinkedHashMap() pre-sizes to 2^30 capacity
  5. Persist
    First put() triggers 4-8 GB heap allocation
  6. Impact
    OutOfMemoryError crashes JVM process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target application runs Apache OpenNLP 3.0.0-M4 or 3.0.0-M5 with the opennlp-spellcheck extension present; (2) the application deserializes a SymSpell .bin model file via any of SymSpellModels.deserialize(InputStream), SymSpellModels.fromBytes(byte[]), SymSpellModelResolver.resolveByLanguage(String), ArtifactSerializer model-archive loading, or the CorrectTextTool CLI invoked with an attacker-controlled file path; and (3) the attacker can supply or influence the model file delivered to one of those paths - for example, through a file upload endpoint, a configurable model URL, a writable classpath directory, or a third-party model repository without integrity verification. If models are loaded exclusively from fixed, integrity-verified classpath resources with no external influence over model bytes or file paths, exploitation is not possible. Apache OpenNLP 1.x and 2.x are entirely unaffected as the opennlp-spellcheck extension does not exist in those release lines.

Impact

No CVSS vector was supplied in the input; severity is assessed independently. The attack mechanism is straightforward: a crafted payload under 100 bytes placed anywhere the application reads SymSpell model bytes triggers an immediate JVM crash. If an application exposes a network-accessible endpoint that accepts user-supplied model bytes or resolves model names from user input, the attack requires no authentication and no meaningful size cost to the attacker. CISA KEV listing is absent and no EPSS data was provided, indicating no observed active exploitation at time of analysis. Critically, the affected code exists only in 3.0.0-M4 and 3.0.0-M5, both milestone (pre-release) versions of Apache OpenNLP 3.x - production deployments on stable 1.x or 2.x lines are entirely unaffected. This substantially narrows the real-world exposure surface. For the limited population running milestone 3.x releases with untrusted model loading, the effective impact is denial of service against the entire JVM process, potentially disrupting all co-hosted services. The fix (3.0.0-M6) is available and the boundary value is configurable, making remediation clean. Overall risk is moderate within the narrow affected deployment window.

Exploit ScenarioDerived

An attacker identifies a web service running on Apache OpenNLP 3.0.0-M4 or 3.0.0-M5 that accepts user-supplied SymSpell model files for spell-checking functionality and calls SymSpellModels.fromBytes() on the uploaded content. The attacker submits a crafted binary payload under 100 bytes in which the unigramCount field is set to Integer.MAX_VALUE; the JVM immediately attempts to allocate a 4-8 GB LinkedHashMap backing array, exhausts the heap, and throws an OutOfMemoryError that terminates the process. No public exploit code has been identified, but the advisory describes the payload structure in sufficient detail that construction is straightforward for anyone familiar with Java serialization formats.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 11, 2026

SymSpellModelSerializer in Apache OpenNLP 3.0.0-M4 and 3.0.0-M5 crashes the host JVM with an OutOfMemoryError when deserializing a crafted SymSpell binary model file whose unigramCount or bigramCount field is set to Integer.MAX_VALUE, forcing a 4-8 GB heap allocation attempt. The root cause (CWE-789: Uncontrolled Memory Allocation) is that these two 32-bit count fields are validated only for non-negativity - no upper bound prevents attacker-controlled pre-sizing of a LinkedHashMap before any dictionary entries are consumed. The attack payload is described by the advisory as under 100 bytes, requires no prior authentication if the target application accepts externally supplied model bytes, and is effective against every deserialization code path in the opennlp-spellcheck extension. No public exploit has been identified at time of analysis, and exposure is substantially limited to the small population running pre-release milestone builds.

RemediationAI

Vendor-released patch: Apache OpenNLP 3.0.0-M6. Users running 3.0.0-M4 or 3.0.0-M5 should upgrade to 3.0.0-M6, which adds an upper-bound check to both unigramCount and bigramCount before any map pre-sizing occurs; values exceeding the bound trigger an IOException and abort the read immediately without large allocation. The default bound is 10,000,000 entries, which accommodates all legitimate SymSpell dictionaries while remaining far below heap-threatening values. Deployments that genuinely require loading larger dictionaries can raise the limit at JVM startup with -DOPENNLP_MAX_ENTRIES=<positive integer>; invalid or non-positive values fall back silently to the 10,000,000 default. Be aware that OPENNLP_MAX_ENTRIES is shared with AbstractModelReader.MAX_ENTRIES, so raising it relaxes both limits. For installations that cannot upgrade immediately, the vendor recommends avoiding the loading of SymSpell .bin model files from any source whose integrity is not independently verified - for example, by validating SHA-256 checksums or cryptographic signatures before deserialization. Avoid passing user-supplied model bytes or user-controlled classpath resource names to any SymSpellModels or SymSpellModelResolver API. See https://lists.apache.org/thread/gnobdsj640c60xl76q8g9o73c7jsybjm for full details.

Affected VersionsENISA

Apache OpenNLP 3.0.0-M4 <3.0.0-M6

Affected Packages

euvd apache_opennlp fix: 3.0.0-M6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in SymSpellModelSerializer.create() within the opennlp-spellcheck extension first shipped in Apache OpenNLP 3.0.0-M4 (CPE: cpe:2.3:a:apache_software_foundation:apache_opennlp). The method reads two 32-bit signed integers - unigramCount and bigramCount - from a structured binary stream immediately after a fixed-size header block (magic bytes, format version, three UTF strings, configuration fields, and an edit-distance identifier) and passes each value directly to LinkedHashMap.newLinkedHashMap() after only a non-negativity check. CWE-789 describes precisely this pattern: a size parameter derived from untrusted input is consumed by an allocation primitive with no ceiling. When Integer.MAX_VALUE (2,147,483,647) is supplied, the resulting LinkedHashMap requests a backing array of 2^30 capacity; the physical allocation (4-8 GB depending on whether the JVM's compressed-oops optimization is active) occurs on the first put() into that map, causing an OutOfMemoryError that terminates the JVM. Affected code paths include SymSpellModels.deserialize(InputStream), SymSpellModels.fromBytes(byte[]), classpath resolution via SymSpellModelResolver.resolveByLanguage(String), the CorrectTextTool command-line interface, and model-archive loading through the registered ArtifactSerializer. The opennlp-spellcheck extension is bundled in the official Apache OpenNLP binary distribution.

Know when Apache Opennlp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (apache) PRIMARY 7.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Model bytes can arrive over a network endpoint with no authentication gate; crash is immediate with no user interaction, confidentiality and integrity unaffected.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
CVSS changed
Sep 14, 2026 - 19:22 NVD
7.5 (HIGH)
Patch available
Sep 11, 2026 - 19:02 EUVD

DescriptionCVE.org

OOM Denial of Service via Unbounded Map Pre-Sizing in Apache OpenNLP SymSpellModelSerializer

Versions Affected:

  • 3.0.0-M4
  • 3.0.0-M5

(The opennlp-spellcheck extension was introduced in 3.0.0-M4. Releases 1.x and 2.x do not contain the affected code.)

Description:

The SymSpellModelSerializer.create() method reads two 32-bit signed integer count fields (unigramCount and bigramCount) from a binary SymSpell model stream and passes each value directly to LinkedHashMap.newLinkedHashMap() after validating only that it is non-negative. No upper bound is applied, so the count is fully attacker-controlled when the model file originates from an untrusted source.

A crafted .bin model file in which either count field is set to Integer.MAX_VALUE (or any value large enough to exhaust the available heap) causes the map to be pre-sized to a capacity of 2^30 entries. The oversized backing array is allocated on the first put() into that map, requesting 4-8 GB depending on whether compressed oops are in effect, and the load fails with an OutOfMemoryError. Because the count fields sit immediately after a fixed-size header (magic, format version, three UTF strings, the configuration fields, and the edit-distance identifier) the attacker pays no meaningful size cost to weaponize a payload: a file of well under 100 bytes plus a single real entry is sufficient to crash a JVM that loads it.

Any code path that deserializes a SymSpell model is affected, including SymSpellModels.deserialize(InputStream), SymSpellModels.fromBytes(byte[]), classpath model loading via SymSpellModelResolver.resolveByLanguage(String), the CorrectTextTool command-line tool, and model-archive loading through the registered ArtifactSerializer. The opennlp-spellcheck extension ships in the official OpenNLP binary distribution.

The practical impact is denial of service against processes that load SymSpell model files from untrusted or semi-trusted origins.

Mitigation:

  • 3.x users should upgrade to 3.0.0-M6.

Note: The fix applies an upper bound to both count fields, checked before the map is pre-sized; counts that are negative or exceed the bound cause an IOException to be thrown and the read to fail fast with no large allocation. The bound is the existing AbstractModelReader.MAX_ENTRIES limit introduced earlie, which the current change promotes to public visibility so that serializers implementing their own binary format can share it. The default bound is 10,000,000, which is well above the entry counts of legitimate SymSpell dictionaries but far below any value that would threaten heap exhaustion. Deployments that legitimately need to load larger dictionaries 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. Note that this property is shared with the model-reader limit and raising it relaxes both.

Users who cannot upgrade immediately should treat all SymSpell .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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Low
pre-release milestone versions only, limited production footprint
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy