Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Arbitrary Argument Injection vulnerabilities in an interactive lesson.
Start learningUpgrade nltk to version 3.10.4 or higher.
nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.
Affected versions of this package are vulnerable to Arbitrary Argument Injection via the nltk.internals.java() function, which appends the caller-supplied cmd sequence to the Java subprocess command without validating that its first token is a Java main-class name. An attacker who can influence the leading item of the cmd argument - or the java_class constructor argument of StanfordSegmenter, which is placed at the head of that sequence - can supply a launcher switch such as -jar or an @argfile reference, causing the Java launcher to execute an attacker-controlled JAR with the privileges of the NLTK process. The 3.10.3 hardening blocked these tokens in the options channel but left the cmd channel unvalidated, providing a complete bypass of that remediation.
Note: This is only exploitable when an embedding application exposes attacker influence over the leading item of nltk.internals.java(cmd=...), or over StanfordSegmenter(java_class=...) or an equivalent wrapper-controlled command token, and the attacker can reference a JAR or argument file readable by the NLTK process.
The complete reproducer, machine-readable proof results, and proposed remediation are included in the attached evidence package.
nltk-3103-candidate-a-maintainer-evidence.zip
The included reproducer/reproduce_cmd_channel_bypass.py creates only temporary researcher-controlled Java source, JAR, argument-file, and marker artifacts. It performs no network access.
Requirements:
nltk==3.10.3java, javac, and jarRun:
python reproducer/reproduce_cmd_channel_bypass.py
A confirmed run exits with status 0 and reports that:
options channel blocks @argfile;cmd channel executes the external JAR 3/3;StanfordSegmenter.java_class channel executes it 3/3; andNote: The PoC states it requires Python 3.10 or newer, nltk==3.10.3, and a JDK providing java, javac, and jar.