CVE-2025-14009: Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution
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.
Security readout for executives and security teams
Plain-English summary
NLTK’s downloader may unpack crafted ZIP packages without checking paths. A malicious package could place files where they should not go and later run code when imported. The source bundle rates this critical, but it does not show confirmed active exploitation.
Executive priority
Treat as urgent for environments that use NLTK downloader in production, CI, notebooks, or shared data-science platforms. Prioritize containment of download sources and vendor patch review.
Technical view
The issue is in nltk/downloader.py _unzip_iter using zipfile.extractall() without path validation. This creates a Zip Slip-style arbitrary file write path. The bundle states malicious package contents, including Python files, can lead to code execution after import.
Likely exposure
Python environments using NLTK downloader to fetch and extract NLTK packages are the primary concern. Exposure is higher where downloads are automated, mirrors are untrusted, or NLTK data directories are writable by application users.
Exploitation context
KEV is false, and the provided sources do not confirm active exploitation. The risk comes from accepting or retrieving malicious NLTK package archives and extracting them through the vulnerable downloader path.
Researcher notes
The bundle names all versions but provides unspecified version ranges and limited remediation detail. Analysis should focus on downloader extraction behavior, package trust boundaries, filesystem write targets, and import-path exposure without assuming exploit activity.
Mitigation direction
Review NLTK, Red Hat, and distribution advisories for patched package guidance.
Avoid downloading NLTK packages from untrusted indexes, mirrors, or user-controlled locations.
Restrict write permissions on NLTK data and application import paths.
Pin trusted package sources and verify integrity where supported.
Monitor vendor advisories because affected version and fix detail is incomplete.
Validation and detection
Inventory systems, containers, and notebooks that install or import nltk.
Identify workflows that call the NLTK downloader automatically.
Confirm NLTK package sources are trusted and integrity-controlled.
Check whether NLTK data directories overlap with Python import paths.
Review Red Hat CSAF and RHSA entries for product-specific status.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-94: Code execution behavior lookup
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
6Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-94 · source CWE mapping
Improper Control of Generation of Code ('Code Injection')
Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.