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 package | Versions | Reported by |
|---|---|---|
| nltk nltk/nltk | from unspecified up to latest | CVE List |
| rhoai/odh-llama-stack-core-rhel9 | Not specified Not affected: from 1775144403 before * | CVE List |
| rhoai/odh-ta-lmes-job-rhel9 | Not specified Not affected: from 1776271296 before * | CVE List |
| openshift-lightspeed/lightspeed-ocp-rag-rhel9 | Not specified | CVE List |
| openshift-lightspeed/lightspeed-service-api-rhel9 | Not specified | CVE List |
| openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 | Not specified | CVE List |
| rhoai/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9 | Not specified | CVE List |
| nltk (PyPI) | before 3.9.3 | GitHub Advisory Database, PyPA Advisory Database |
| nltk nltk | before 3.9.3 | NVD |
All scores
| @huntr_ai | 10.0critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| redhat-SADP | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 10.0critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| PyPA Advisory Database | 10.0critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Classification
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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-14009 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7p94-766c-hgjp changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-14009 changed 2026-07-15 | Public domain |
| PyPA Advisory Database | PYSEC-2026-96 changed 2026-06-10 | CC-BY-4.0 |