CVE-2025-14009: Nltk NLTK Has A Zip Slip Vulnerability
CRITICALCVE-2025-14009 is a CRITICAL (CVSS 10.0) nltk has a zip slip vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Nltk libraries in the PyPI ecosystem. The issue involves nltk has a zip slip vulnerability. Remediation is available by upgrading affected packages to version 3.9.3.
CVE-2025-14009 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2025-14009
To remediate this vulnerability, upgrade all affected Nltk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install nltk>=3.9.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show nltk
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-14009, inspect your installed packages using pip:
pip show nltk
Analyze the terminal output to locate any version of Nltk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.3), your application is affected.
Note: The pip show nltk command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Nltk, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-14009 Affected Nltk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nltk
|
PyPI |
< 3.9.3
|
3.9.3
|
References
Frequently Asked Questions
What is CVE-2025-14009?
Which Nltk versions are affected?
What version fixes CVE-2025-14009?
Is nltk affected?
What is the CVSS score of CVE-2025-14009?
What CWE is associated with CVE-2025-14009?
How can I check PyPI dependencies for CVE-2025-14009?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7p94-766c-hgjp",
"modified" : "2026-06-06T14:46:18Z",
"published" : "2026-02-18T18:30:40Z",
"aliases" : [ "CVE-2025-14009" ],
"summary" : "NLTK has a Zip Slip Vulnerability",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "nltk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.9.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.9.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-14009"
}, {
"type" : "WEB",
"url" : "https://github.com/nltk/nltk/pull/3468"
}, {
"type" : "WEB",
"url" : "https://github.com/nltk/nltk/commit/1056b323af6462455571302e766b67cf300aea18"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nltk/nltk"
}, {
"type" : "WEB",
"url" : "https://github.com/nltk/nltk/blob/4154eb85e832f266660a09286c7e37e308292284/ChangeLog#L1"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-96.yaml"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/49ecbc02-054e-4470-b2e0-b267936cc4e4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-19T20:27:43Z",
"nvd_published_at" : "2026-02-18T18:24:19Z"
}
}