Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution (nltk nltk/nltk)

CVE-2025-14009
HIGH 8.8

At a glance

Source
NVD
EPSS
EPSS 1.04 % · percentile 64 ()
State
PUBLISHED
Published
Updated
Assigner
@huntr_ai
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-94 — Improper Control of Generation of Code

References

Scores

VersionScoreVectorScored by
CVSS 3.0CRITICAL 10.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H@huntr_ai
CVSS 3.1HIGH 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hredhat-SADP
CVSS 3.1HIGH 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary)
CVSS 3.0CRITICAL 10.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HNVD · security@huntr.dev (Secondary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
nltk · nltk/nltkaffected unspecified ≤ latest

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD