Reported by 4 outlets
CVE-2026-128138: CVSS 9.8 NLTK sandbox bypass allows arbitrary Java execution
Why this score
- Breadth
- 2.00 / 2.0 · 4 sources
- Authority
- 1.00 / 2.0 · best outlet weight
- Severity
- 4.50 / 5.0 · CVSS + content signals
- Velocity
- 0.00 / 2.0 · updates in 48h
- Pickup speed
- 0.59 / 0.6 · time to second source
- Recency
- × 0.00 temporal multiplier
- Community
- + 0.00 / 1.5 · reddit signal
- Score
- 0.0 / 10 = base × recency + community
Desk analysis
CVE-2026-128138 (GHSA-x8q7-6c7m-52gw, CVSS 9.8) is an incomplete-fix bypass in NLTK 3.10.3, the release that closed the August 2026 argument-injection round. The 3.10.3 hardening validates the per-call options list in nltk.internals.java(), rejecting launcher tokens such as -jar and @argfile there, then assembles the command by appending the caller-supplied cmd list without checking that its first item is a Java main class. Java reads that leading token as a launcher switch, so cmd=["-jar", some.jar] or StanfordSegmenter(java_class="@args") starts an attacker-chosen JAR in a child JVM running with the privileges of the Python process. The advisory, credited to kokomaru167, confirms both forms three times out of three against the published nltk-3.10.3 wheel, while the same argfile token through options is refused with a ValueError citing CVE-2026-12841 and CWE-88. Affected is exactly 3.10.3; patched is 3.10.4.
The 9.8 overstates the remote story and understates the operational one. The reporter himself suggested Moderate, and exploitation needs an embedding application that lets untrusted input reach the leading java(cmd=...) token or a Stanford wrapper's java_class argument, so this is not a drive-by library bug. It matters because NLTK 3.10.3 is precisely the version the market just adopted as the fix: the August advisories CVE-2026-79675 and CVE-2026-79674 (GHSA-m4rf-3fr8-xwx3, GHSA-3GQ4-3J92-5W49, both <=3.10.2, fixed in 3.10.3) pushed every careful team onto 3.10.3, and this bypass reopens the same JVM boundary on that population. The pattern is the real signal: the same release also carries GHSA-7mxv-7h3q-9324 (dot2img running a trojaned Graphviz dot from a writable PATH directory, CVSS 7.8) and GHSA-wr3g-j6qj-xpgh (ZIP extraction following in-root hardlinks outside the data root, CVSS 7.1), so a pipeline that accepts a corpus path, a class name, or a model path is one argument away from code execution as a worker that usually holds broad file and credential access. The second id in the story feed, CVE-2026-12813, is an unrelated activepieces file-read issue and should not be patched as NLTK.
Move to 3.10.4, published on PyPI 2026-10-21: every NLTK sandbox advisory from the August and November 2026 batches, including CVE-2026-81726 (GHSA-8mgp-746c-j5xp, model-artifact APIs bypassing pathsec) and CVE-2026-128135, lists 3.10.4 as the fixed version, and the java() cmd fix landed as PR #3771 (commit 45a08fded8025c4920ea95a896438fcdbaafb03e) before that release. Where upgrading is blocked, strip leading dash and @ tokens from anything that reaches java(cmd=...) or StanfordSegmenter(java_class=...), keep the classpath to a fixed allowlist, and never set NLTK_ALLOW_UNSAFE_JARS, NLTK_ALLOW_UNSAFE_CLASSPATH, or pass trusted_raw_options. For hunting, inventory nltk.internals.java, StanfordSegmenter, StanfordTokenizer, StanfordTagger and GenericStanfordParser call sites with java_options or path_to_jar parameters, then look for java children whose command line carries -jar or an @argfile under the service account that runs your Python workers, and for JAR files appearing in world-writable directories. Confirm the installed version with pip show nltk rather than the lockfile alone.
Watch two things. First, whether maintainers accept the 9.8 rating or downgrade toward the reporter's suggested Moderate, since the score drives queue position while reachability stays application-specific. Second, whether 3.10.4 fully closes the sandbox family or a 3.10.5 is needed for the November entries with no patched version, because a second bypass would confirm that NLTK's data-root model cannot be patched one argument channel at a time.
Timeline
-
original reporting
Patch CVE-2026-128138 now. This critical CVSS 9.8 NLTK Sandbox Bypass lets attackers run untrusted Java JARs via unchecked command tokens. #
meterpreter.org · 14d ago · November 16th, 2026
Patch CVE-2026-128138 now. This critical CVSS 9.8 NLTK Sandbox Bypass lets attackers run untrusted Java JARs via unchecked command tokens. #
-
update from github.com
GHSA-m4rf-3fr8-xwx3: NLTK before 3.10.3 JVM argument injection bypass via per-call options (CVE-2026-79675)
github.com · 110d ago · August 11th, 2026
This critical advisory, rated CVSS 9.8 and published 2026-08-11, is the incomplete-fix predecessor to CVE-2026-128138: the CVE-2026-12841 patch added _validate_java_options() to block flags such as -agentlib, -agentpath, -javaagent, -Xrunjdwp and @argfile, but validation runs only in config_java() and not in the java() function's per-call options parameter introduced by PR #3683. All four Stanford wrappers (GenericStanfordParser, StanfordTagger, StanfordTokenizer, StanfordSegmenter) accept user-supplied java_options and route them through that unvalidated path in nltk/internals.py. Affected versions are 3.10.2 and earlier and the fix is 3.10.3.
-
update from github.com
GHSA-3GQ4-3J92-5W49: NLTK corpus reader sandbox bypass (CVE-2026-79674)
github.com · 110d ago · August 11th, 2026
Published the same day as GHSA-m4rf-3fr8-xwx3, this high-severity advisory covers NLTK corpus-reader constructors reaching outside-root files and SQLite databases before the nltk.pathsec sandbox boundary is enforced, with a proof of concept showing the same read blocked by pathsec.open. The advisory lists nltk 3.10.2 and earlier as affected and 3.10.3 as patched, and it is one of the advisories the 3.10.3 hardening was built around.
-
update from github.com
GHSA-8mgp-746c-j5xp: NLTK model-artifact APIs bypass pathsec and touch files outside allowed roots (CVE-2026-81726)
github.com · 109d ago · August 12th, 2026
This high-severity advisory, published 2026-08-12, reports that several model-artifact APIs treat caller-controlled paths as ordinary filenames: TransitionParser.train and TransitionParser.parse read and write outside the allowed roots, and AveragedPerceptron.save/load plus PerceptronTagger.save_to_json do the same, using built-in open() where pathsec-aware helpers reject the identical paths. The advisory names NLTK 3.10.3 as affected and 3.10.4 as patched, which is why 3.10.4 is the minimum safe version for the sandbox story as a whole.
-
update from github.com
nltk PR #3771: reject Java launcher switches and @argfiles in the java() cmd argument (CWE-88)
github.com · 101d ago · August 20th, 2026
The fix for the cmd channel landed nearly three months before the CVE-2026-128138 advisory: PR #3771 was opened 2026-08-20 and merged the same day as commit 45a08fded8025c4920ea95a896438fcdbaafb03e, split out of PR #3753. The pull request states that internals.java() passes a caller-supplied cmd list straight to the Java launcher, which treats the first non-option token as the main class, so a cmd beginning with -jar, -version, -XX:OnError or an @argfile reopens the argument-injection class that the CVE-2026-12841 options allowlist was meant to close. The merged change raises a ValueError when the first cmd item starts with a dash or @ sign and blocks argfile references, and it ships in the 3.10.4 release line rather than in 3.10.3.
-
update from pypi.org
nltk 3.10.4 release
pypi.org · 39d ago · October 21st, 2026
PyPI shows nltk 3.10.4 uploaded on 2026-10-21, roughly three and a half weeks before CVE-2026-128138 was published, and every NLTK sandbox advisory from the August and November 2026 batches lists 3.10.4 as the patched version.
-
update from github.com
GHSA-7mxv-7h3q-9324: NLTK dot2img runs Graphviz dot without the trusted-exec chokepoint (CVE-2026-128134)
github.com · 34d ago · October 26th, 2026
This advisory, published 2026-10-26 with a CVSS 7.8 vector of AV:L/AC:L/PR:L/UI:N, reports that nltk.parse.dependencygraph.dot2img resolves the Graphviz dot executable by bare name and runs it with a raw subprocess.run, skipping the ownership check and loader-environment scrub that nltk.pathsec.spawn_trusted applies. A local unprivileged actor who can write to any group or world-writable directory on the victim PATH can plant a trojan dot that executes as the victim when a DependencyGraph is rendered, including the Jupyter repr_svg path.
-
update from github.com
GHSA-x8q7-6c7m-52gw: NLTK 3.10.3 incomplete fix, JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments (CVE-2026-128138)
github.com · 14d ago · November 15th, 2026
The vendor advisory behind CVE-2026-128138, published on GitHub on 2026-11-15 and credited to reporter kokomaru167, documents that the 3.10.3 remediation validates the options channel but appends the caller-supplied cmd list to the JVM command without checking that its first item is a Java main class. Two reachable paths are confirmed against the official nltk-3.10.3 wheel: nltk.internals.java(cmd=["-jar", external_jar]) and StanfordSegmenter(java_class="@argfile"), each executing a controlled external JAR in 3 of 3 runs while the same argfile token is rejected through options with a ValueError citing CVE-2026-12841 and CWE-88. Affected range is exactly 3.10.3 and the patched version is 3.10.4, with the note that importing NLTK alone is not remotely exploitable and that a child JVM runs with the privileges of the Python process.
-
update from github.com
GHSA-wr3g-j6qj-xpgh: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data root (CVE-2026-128135)
github.com · 14d ago · November 15th, 2026
Published two minutes after the CVE-2026-128138 advisory in the same GitHub batch, this high-severity entry (CVSS 7.1) describes nltk.pathsec.ZipFile.extract opening each member target without checking whether it is a hardlink to a file outside the data root, so a local actor who can write inside a shared or predictable root such as the group-writable /usr/share/nltk_data pre-plants an in-root hardlink that nltk.download() then truncates and overwrites. Affected versions are 3.9.4 through 3.10.3 and the patched version is 3.10.4, so the November disclosure wave maps onto the release defenders should already be running.
-
update from secquill.com
NLTK fixes a bypass that let outside Java code slip past its safety checks NLTK 3.10.4 closes a gap in safeguards added in 3.10.3, where app
secquill.com · 8d ago · November 21st, 2026
NLTK fixes a bypass that let outside Java code slip past its safety checks NLTK 3.10.4 closes a gap in safeguards added in 3.10.3, where app