chore(deps): update dependency nltk to v3.9.4 [security]#928
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency nltk to v3.9.4 [security]#928renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
0459ed8 to
f675340
Compare
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:
==3.9.2→==3.9.4GitHub Vulnerability Alerts
CVE-2025-14009
A critical vulnerability exists in the NLTK downloader component of nltk/nltk, affecting all versions. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks. This allows attackers to craft malicious zip packages that, when downloaded and extracted by NLTK, can execute arbitrary code. The vulnerability arises because NLTK assumes all downloaded packages are trusted and extracts them without validation. If a malicious package contains Python files, such as init.py, these files are executed automatically upon import, leading to remote code execution. This issue can result in full system compromise, including file system access, network access, and potential persistence mechanisms.
CVE-2026-33230
Summary
nltk.app.wordnet_appcontains a reflected cross-site scripting issue in thelookup_...route. A craftedlookup_<payload>URL can inject arbitrary HTML/JavaScript into the response page because attacker-controlledworddata is reflected into HTML without escaping. This impacts users running the local WordNet Browser server and can lead to script execution in the browser origin of that application.Details
The vulnerable flow is in
nltk/app/wordnet_app.py:nltk/app/wordnet_app.py:144lookup_are handled as HTML responses:page, word = page_from_href(sp)nltk/app/wordnet_app.py:755page_from_href()callspage_from_reference(Reference.decode(href))nltk/app/wordnet_app.py:769word = href.wordnltk/app/wordnet_app.py:796wordis inserted directly into the HTML body:body = "The word or words '%s' were not found in the dictionary." % wordThis is inconsistent with the
searchroute, which does escape user input:nltk/app/wordnet_app.py:136word = html.escape(...)As a result, a malicious
lookup_...payload can inject script into the response page.The issue is exploitable because:
Reference.decode()accepts attacker-controlled base64-encoded pickle data for the URL state.wordis reflected into HTML withouthtml.escape().HTTPServer(("", port), MyServerHandler), so it listens on all interfaces by default, not justlocalhost.PoC
docker run -d --name nltk-wordnet-web -p 8002:8002 \ nltk-sandbox \ python -c "import nltk; nltk.download('wordnet', quiet=True); from nltk.app.wordnet_app import wnb; wnb(8002, False)"("<script>alert(1)</script>", {})Encoded payload:
curl -s "http://127.0.0.1:8002/lookup_gAWVIQAAAAAAAACMGTxzY3JpcHQ-YWxlcnQoMSk8L3NjcmlwdD6UfZSGlC4="I also validated the issue directly at function level in Docker:
Observed output:
Impact
This is a reflected XSS issue in the NLTK WordNet Browser web UI.
An attacker who can convince a user to open a crafted
lookup_...URL can execute arbitrary JavaScript in the origin of the local WordNet Browser application. This can be used to:This primarily impacts users who run
nltk.app.wordnet_appas a local or self-hosted HTTP service and open attacker-controlled links.Release Notes
nltk/nltk (nltk)
v3.9.4Compare Source
v3.9.3Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 was generated by Mend Renovate. View the repository job log.