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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-14009
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 19:29 UTC · Revision 1
Source evidence
Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution
core-osv · Original sourcePublished 18 Feb 2026, 17:45 UTC
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.
osv:CVE-2025-14009
Complete source record
{
"id": "37d7c09b67c9006c52d3775d3b4beffa74fd70b7656b3f4c4c423a748334c12f",
"url": "https://osv.dev/vulnerability/CVE-2025-14009",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution",
"summary": "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.",
"evidence": "osv:CVE-2025-14009",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-14009",
"aliases": [
"CVE-2025-14009",
"GHSA-7p94-766c-hgjp",
"PYSEC-2026-96"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/nltk/nltk",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "4154eb85e832f266660a09286c7e37e308292284"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.9.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v3.9.2",
"3.9.2",
"3.9.1",
"3.9",
"3.8.2",
"3.8.1",
"3.8",
"3.7",
"3.6.7",
"3.6.6",
"3.6.5",
"3.6.2",
"3.6.1",
"3.6",
"3.5",
"3.5b1",
"3.4.4",
"3.4.3",
"3.4.1",
"3.4",
"3.3",
"3.2.5",
"3.2.4",
"3.2.3",
"3.2.2",
"3.2.1",
"3.2",
"3.1",
"3.0.5",
"3.0.4",
"3.0.3",
"3.0.2",
"3.0.0b1",
"3.0a4",
"2.0.1rc4",
"2.0.1rc3",
"2.0.1rc2",
"2.0.1rc1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-14009.json"
}
}
],
"modified": "2026-10-28T02:30:31.679245827Z",
"provider": "osv",
"references": [
"https://huntr.com/bounties/49ecbc02-054e-4470-b2e0-b267936cc4e4",
"https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-14009.json",
"https://access.redhat.com/errata/RHSA-2026:10184",
"https://access.redhat.com/security/cve/CVE-2025-14009",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/14xxx/CVE-2025-14009.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-14009",
"https://bugzilla.redhat.com/show_bug.cgi?id=2440724"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "@huntr_ai",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/14xxx/CVE-2025-14009.json"
}
},
"related_cves": [
{
"value": "CVE-2025-14009",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498728,
"published_at": "2026-02-18T17:45:17.573+00:00"
}