NLTK 3.10.3 security fix leaves a Java sandbox bypass, addressed in 3.10.4
- NLTK
- sandbox bypass
CWE-88CWE-94

Flaw allows arbitrary Java bytecode execution via unvalidated command tokens
Issue affects nltk.internals.java function and StanfordSegmenter class
NLTK 3.10.4 fixes the issue
NLTK developers reported an incomplete security fix in NLTK 3.10.3 that leaves a way to bypass protections against untrusted Java archive (JAR) execution. The issue affects the public nltk.internals.java() helper and the StanfordSegmenter class.
The flaw is that these components do not validate the first item in a caller-supplied command sequence as a Java main-class name. As a result, a launcher token can pass through this command channel even though related Java options are checked. The earlier fix blocked the direct outside-classpath route, but this alternate route remained.
Successful exploitation can run attacker-selected Java bytecode with the privileges of the process using NLTK. NLTK 3.10.4 addresses the issue; versions from 3.10.3 up to, but not including, 3.10.4 are affected.




