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-06-16
AI Q&A
2026-02-18
EPSS Evaluated
2026-06-14
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 Quick Actions
Instant insights powered by AI
Executive Summary

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.

Impact Analysis

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.
Compliance Impact

I don't know

Detection Guidance

I don't know

Mitigation Strategies

I don't know

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-14009. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart