chore(deps): update dependency nltk to v3.10.3 [security] - #375
Merged
dreadnode-renovate-bot[bot] merged 1 commit intoSep 2, 2026
Conversation
| datasource | package | from | to | | ---------- | ------- | ------ | ------ | | pypi | nltk | 3.10.0 | 3.10.3 |
dreadnode-renovate-bot
Bot
deleted the
renovate/pypi-nltk-vulnerability
branch
September 2, 2026 00:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
| Package | Change | Age | Confidence |
|
Generated Summary:
No relevant changes.
This summary was generated with ❤️ by rigging
| nltk (source) |
|
|
3.10.0→3.10.3|NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
CVE-2026-78680 / GHSA-6hwm-xvph-95vm
More information
Details
Two NLTK sites executed the Graphviz
dotprogram by bare name, so process creation resolved it via the search path — and on Windows via the current working directory — rather than a validated absolute location. An attacker who can place a file nameddotwhere resolution looks (the CWD on Windows, or a writable/relative entry such as.onPATH) has their binary executed in place of Graphviz (arbitrary code execution).Affected (<= 3.10.2):
nltk.parse.dependencygraph.dot2img— calledfind_binary("dot")but discarded the returned validated path and then ran the bare name["dot", ...], so the validation had no effect.nltk.translate.api.AlignedSent._repr_svg_— ran the bare name with no validation at all (IPython SVG rendering).This is the same class already fixed for the senna, weka, boxer, malt, repp and hunpos wrappers.
nltk.internals.find_binaryrefuses a CWD-relative match for a bare tool name and returns only a trusted absolute path; the fix runs that path in both sites.Attack demonstration
Captured output, not illustrative. A
./dotthat writes aPWNEDmarker, planted in the CWD with.prepended toPATH.The vulnerable behaviour (old bare-name exec):
The patched functions refuse it:
And
find_binaryitself was attacked directly (the fix trusts nothing else):Attack 4 is out of scope: trusting an absolute directory that is already on
PATHis the operating system's own trust model — an attacker who can write to aPATHdirectory owns the account regardless of NLTK.find_binarydefends specifically against the CWD/relative injection that bare-name exec is vulnerable to (attacks 1–3), which is exactly what this fix inherits.Environment: python 3.13.7.
dotis not required to reproduce — the planted binary is the payload.Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
NLTK: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841)
CVE-2026-79675 / GHSA-m4rf-3fr8-xwx3
More information
Details
Vulnerability
The fix for CVE-2026-12841 (CWE-88, JVM argument injection) added
_validate_java_options()to block dangerous JVM flags such as-agentlib,-agentpath,-javaagent,-Xrunjdwp, and@argfilereferences. However, the validation is only applied when setting global options viaconfig_java(). Thejava()function's per-calloptionsparameter -- added by PR #3683 (CVE-2026-12615 fix) -- passes options directly tosubprocess.Popenwithout calling_validate_java_options().All four Stanford Java wrapper classes accept user-supplied
java_optionsand route them through the unvalidated per-call path, bypassing the CVE-2026-12841 fix entirely.Root Cause
In
nltk/internals.py, thejava()function (line 128) accepts anoptionskeyword argument. Whenoptionsis not None, it is converted to a list and prepended to the JVM command (lines 211-217) without any validation:Compare with
config_java()(line 92) which does validate:The four affected wrapper classes store user-supplied
java_optionswithout validation and pass them through the unvalidated per-call path:GenericStanfordParser(nltk/parse/stanford.py): constructor parameter at line 39, stored at line 78, passed at lines 247 and 256StanfordTagger(nltk/tag/stanford.py): constructor parameter at line 51, stored at line 79, passed at line 118StanfordTokenizer(nltk/tokenize/stanford.py): constructor parameter at line 43, stored at line 66, passed at line 109StanfordSegmenter(nltk/tokenize/stanford_segmenter.py): constructor parameter at line 68, stored at line 117, passed at line 337Proof of Concept
Impact
An attacker who controls the
java_optionsparameter to any NLTK Stanford wrapper class can inject arbitrary JVM flags, including:-agentpath:/path/to/malicious.so-- loads a native agent, achieving arbitrary code execution-javaagent:/path/to/malicious.jar-- loads a Java agent for bytecode manipulation-agentlib:jdwp=transport=dt_socket,server=y,address=*:5005-- enables remote debugging, allowing remote code execution@/path/to/argfile-- expands an argument file, which can smuggle any of the aboveThis is exploitable in scenarios where NLTK is deployed as a service and
java_optionsis derived from user input, configuration files, or environment variables. The PR #3647 commit message explicitly states the fix was intended to cover "StanfordSegmenter, and GenericStanfordParser" but the implementation only validates inconfig_java().Suggested Fix
Add
_validate_java_options()to thejava()function's per-call options handling:This single-line addition closes the bypass for all four Stanford wrapper classes and any future callers of
java(options=...).AI tooling
AI assistance was used for the code audit and for drafting this report. The finding were manually verified against the project's source at the location cited above before reporting it, and the severity and impact assessment are the reporters.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nltk/nltk (nltk)
v3.10.3Compare Source
Version 3.10.3 2026-08-12
Thanks to the following contributors to 3.10.3: Mohammad Favas S, leduckhuong, Ziyu Lin, dougtrainer28-cmyk, Chaitanya Kadian, 0xRenSec, Arpit Jain, Jace, nguyencanhthuong, Liling Tan, medimedi, Eric Kafe.
What's Changed
New Contributors
Full Changelog: nltk/nltk@v3.10.2...v3.10.3
v3.10.2Compare Source
Version 3.10.2 2026-08-05
Thanks to the following contributors to 3.10.2:
Litesh Ghute, Eric Kafe, Evan Kiefer, tarann26 and Rav Singh Chandan
v3.10.1Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.