CVE-2025-14009
Arbitrary Code Execution via Unsafe Zip Extraction in NLTK Downloader
Publication date: 2026-02-18
Last updated on: 2026-03-06
Assigner: huntr.dev
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nltk | nltk | to 3.9.3 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the NLTK downloader component, specifically in the _unzip_iter function of nltk/downloader.py. The function uses zipfile.extractall() without validating the paths or performing security checks on the extracted files.
Because NLTK assumes all downloaded packages are trusted, it extracts them without any validation. An attacker can craft a malicious zip package that, when downloaded and extracted by NLTK, can execute arbitrary code on the victim's system.
If the malicious package contains Python files like __init__.py, these files can be executed automatically upon import, leading to remote code execution and potentially full system compromise.
How can this vulnerability impact me? :
This vulnerability can have severe impacts including full system compromise.
- Attackers can gain arbitrary code execution on your system.
- It can lead to unauthorized file system access.
- Attackers may gain network access through the compromised system.
- There is potential for attackers to establish persistence mechanisms, maintaining long-term control over the system.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
I don't know