Executive summary
A newly disclosed CVE‑2026‑67211 allows an attacker to cause an OutOfMemoryError in Apache OpenNLP versions 3.0.0‑M4 and 3.0.0‑M5. The flaw resides in the SymSpellModelSerializer, where attacker‑controlled size fields are used to pre‑size a LinkedHashMap without an upper bound, leading to heap exhaustion and a denial‑of‑service condition.
What is affected
- Apache OpenNLP 3.0.0‑M4 and 3.0.0‑M5 (the opennlp‑spellcheck extension introduced in 3.0.0‑M4).
- The SymSpellModelSerializer class and any code path that deserializes a SymSpell model, such as:
SymSpellModels.deserialize(InputStream)SymSpellModels.fromBytes(byte[])SymSpellModelResolver.resolveByLanguage(String)- The
CorrectTextToolcommand‑line utility - Model‑archive loading via the registered
ArtifactSerializer
Severity and evidence
The vulnerability results in an OutOfMemoryError when a maliciously crafted .bin model file sets either unigramCount or bigramCount to a very large value (e.g., Integer.MAX_VALUE). The map is pre‑sized for 2^30 entries, allocating 4–8 GB on the first insertion and crashing the JVM. The attack requires a file well under 100 bytes, making exploitation trivial when model files are sourced from untrusted or semi‑trusted locations.
Business or operational impact
Affected applications that load SymSpell models will terminate abruptly, causing service interruption, loss of availability, and potential downstream cascade failures. The impact is limited to denial‑of‑service; no code execution or data disclosure is reported.
Detection considerations
- Monitor application logs for
OutOfMemoryErrororjava.lang.OutOfMemoryError: Java heap spaceoccurring during model loading. - Alert on crashes of processes that invoke
CorrectTextToolor any OpenNLP component that reads SymSpell.binfiles. - Track inbound
.binmodel files from external sources; unexpected size fields may indicate exploitation attempts.
Recommended defensive actions
- Upgrade to Apache OpenNLP 3.0.0‑M6 or later, which adds upper‑bound validation on the count fields and throws an
IOExceptioninstead of allocating massive memory. - Validate the provenance of SymSpell model files before deserialization. Use checksums or digital signatures where possible.
- Configure the
OPENNLP_MAX_ENTRIESsystem property to enforce a sensible limit (default is 10,000,000). Example:-DOPENNLP_MAX_ENTRIES=5000000. - Apply runtime hardening: set JVM heap limits and enable OOM‑killer alerts to contain the impact.
Workarounds or mitigations, if supported
- If upgrading is not immediately possible, treat all SymSpell
.binfiles as untrusted input. Reject or sandbox model loading from external users or third‑party repositories. - Reduce the default
OPENNLP_MAX_ENTRIESby setting a lower value via the system property to further limit potential allocations.
Patch or remediation status
The fix is available in Apache OpenNLP 3.0.0‑M6. No additional patches are mentioned in the source. Users of earlier 3.x releases should plan to upgrade promptly.
References
- NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2026-67211
- Apache OpenNLP release notes for 3.0.0‑M6 (contains the upper‑bound fix)
Publication date and last checked date
- Publication date: 2026‑09‑16
- Last checked: 2026‑09‑17