CVE-2025-14009: CWE-94 Improper Control of Generation of Code in nltk nltk/nltk
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.
AI Analysis
Technical Summary
CVE-2025-14009 is a critical code injection vulnerability in the nltk/nltk library's downloader component. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks, trusting all downloaded packages implicitly. Attackers can craft malicious zip archives containing Python files that execute arbitrary code when extracted and imported by NLTK. This vulnerability enables remote code execution leading to full system compromise, including unauthorized file system and network access. The vulnerability affects all versions of nltk/nltk. Red Hat advisories acknowledge the CVE but do not provide a direct patch for nltk, indicating patch status is not yet confirmed.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code on the affected system without any privileges or user interaction, resulting in full system compromise. This includes unauthorized access to the file system, network, and potential persistence on the host. The vulnerability has a CVSS v3.0 score of 10.0 (critical), reflecting its high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Red Hat advisories reference this CVE but do not indicate an official fix for nltk. Until a patch is available, users should avoid downloading and extracting untrusted packages with the NLTK downloader. Consider manual validation of downloaded content or restricting network access for environments using NLTK downloader. Monitor official vendor advisories for updates and apply patches promptly once released.
CVE-2025-14009: CWE-94 Improper Control of Generation of Code in nltk nltk/nltk
Description
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.
CVSS v3.0
Score 10.0critical
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-14009 is a critical code injection vulnerability in the nltk/nltk library's downloader component. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks, trusting all downloaded packages implicitly. Attackers can craft malicious zip archives containing Python files that execute arbitrary code when extracted and imported by NLTK. This vulnerability enables remote code execution leading to full system compromise, including unauthorized file system and network access. The vulnerability affects all versions of nltk/nltk. Red Hat advisories acknowledge the CVE but do not provide a direct patch for nltk, indicating patch status is not yet confirmed.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code on the affected system without any privileges or user interaction, resulting in full system compromise. This includes unauthorized access to the file system, network, and potential persistence on the host. The vulnerability has a CVSS v3.0 score of 10.0 (critical), reflecting its high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Red Hat advisories reference this CVE but do not indicate an official fix for nltk. Until a patch is available, users should avoid downloading and extracting untrusted packages with the NLTK downloader. Consider manual validation of downloaded content or restricting network access for environments using NLTK downloader. Monitor official vendor advisories for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2025-12-04T09:27:21.716Z
- Cvss Version
- 3.0
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2025-14009","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:10184","vendor":"Red Hat"}]
Threat ID: 69969ef76aea4a407a3d9a78
Added to database: 02/19/2026, 05:26:15 UTC
Last enriched: 07/15/2026, 08:16:16 UTC
Last updated: 09/10/2026, 19:36:49 UTC
Views: 728
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.