CVE-2026-128138: NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments
Exploitation: Public exploit · CVSS 9.8 Critical · Unauthenticated · Published 2026-11-19
Description
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.3 until 3.10.4, the NLTK 3.10.3 JVM hardening validates Java launcher tokens in the options channel but appends the caller-controlled cmd sequence without requiring its first token to be a main class. Supplying -jar or an @argfile through nltk.internals.java or StanfordSegmenter.java_class can therefore execute attacker-selected Java bytecode without the unsafe-JAR opt-in. This issue is fixed in version 3.10.4.
Enclave's analysis
NLTK's JVM launcher helper (nltk.internals.java() and the deprecated StanfordSegmenter wrapper) still lets an attacker smuggle a -jar or @argfile token past the validation NLTK added for this exact bug class, letting them run arbitrary Java bytecode. The catch: this only fires if the host app feeds untrusted input into a low-level, rarely-used parameter (the cmd first token or java_class), using legacy code that's been deprecated since 2017. A researcher built a working local reproducer proving the bypass, but there's no public exploit tool and no sign of in-the-wild use. Upgrade to nltk 3.10.4 and audit anything still calling the Stanford wrapper classes.
Fix
No fixed version in the CVE record yet. Follow the vendor advisory.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| nltk | >= 3.10.3, < 3.10.4 | Not listed |
Affected packages
- pypi:nltk