CVE-2025-14009
JSON

8.8high

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

Severity
8.8high CVSS:3.1 by redhat-SADP
Exploit likelihood
1.40% (higher than 73% of CVEs)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-7p94-766c-hgjpPYSEC-2026-96

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.

Affected

Product or packageVersionsReported by
nltk nltk/nltkfrom unspecified up to latestCVE List
rhoai/odh-llama-stack-core-rhel9Not specified
Not affected: from 1775144403 before *
CVE List
rhoai/odh-ta-lmes-job-rhel9Not specified
Not affected: from 1776271296 before *
CVE List
openshift-lightspeed/lightspeed-ocp-rag-rhel9Not specifiedCVE List
openshift-lightspeed/lightspeed-service-api-rhel9Not specifiedCVE List
openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9Not specifiedCVE List
rhoai/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-rhel9Not specifiedCVE List
rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9Not specifiedCVE List
nltk (PyPI)before 3.9.3GitHub Advisory Database, PyPA Advisory Database
nltk nltkbefore 3.9.3NVD

All scores

@huntr_ai10.0critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
redhat-SADP8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub10.0critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
PyPA Advisory Database10.0critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

Una vulnerabilidad crítica existe en el componente de descarga de NLTK de nltk/nltk, que afecta a todas las versiones. La función _unzip_iter en nltk/downloader.py utiliza zipfile.extractall() sin realizar validación de rutas o comprobaciones de seguridad. Esto permite a los atacantes crear paquetes zip maliciosos que, al ser descargados y extraídos por NLTK, pueden ejecutar código arbitrario. La vulnerabilidad surge porque NLTK asume que todos los paquetes descargados son de confianza y los extrae sin validación. Si un paquete malicioso contiene archivos Python, como __init__.py, estos archivos se ejecutan automáticamente al importarlos, lo que lleva a la ejecución remota de código. Este problema puede resultar en un compromiso total del sistema, incluyendo acceso al sistema de archivos, acceso a la red y posibles mecanismos de persistencia.

References

https://huntr.com/bounties/49ecbc02-054e-4470-b2e0-b267936cc4e4evidence, exploit, third-party-advisory, web
https://access.redhat.com/security/cve/CVE-2025-14009vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2440724issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-14009.json
https://access.redhat.com/errata/RHSA-2026:10184vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2025-14009advisory
https://github.com/nltk/nltk/pull/3468web
https://github.com/nltk/nltk/commit/1056b323af6462455571302e766b67cf300aea18web
https://github.com/nltk/nltkpackage
https://github.com/nltk/nltk/blob/4154eb85e832f266660a09286c7e37e308292284/ChangeLog#L1web
https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-96.yamlweb
https://github.com/advisories/GHSA-7p94-766c-hgjpadvisory

Sources

SourceRecordLicence
CVE ListCVE-2025-14009 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-7p94-766c-hgjp changed 2026-09-10CC-BY-4.0
NVDCVE-2025-14009 changed 2026-07-15Public domain
PyPA Advisory DatabasePYSEC-2026-96 changed 2026-06-10CC-BY-4.0