CVE-2025-14009
Received Received - Intake
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
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 Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-18
Last Modified
2026-03-06
Generated
2026-05-27
AI Q&A
2026-02-18
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
nltk nltk to 3.9.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart