Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nltkPyPI | < 3.9.3 | 3.9.3 |
Affected products
15- osv-coords14 versionspkg:apk/chainguard/kubeflow-pipelines-visualization-serverpkg:apk/chainguard/label-studiopkg:apk/chainguard/nemopkg:apk/chainguard/open-webuipkg:apk/chainguard/py3.11-nltkpkg:apk/chainguard/py3.12-nltkpkg:apk/chainguard/py3.13-nltkpkg:apk/wolfi/kubeflow-pipelines-visualization-serverpkg:apk/wolfi/open-webuipkg:apk/wolfi/py3.11-nltkpkg:apk/wolfi/py3.12-nltkpkg:apk/wolfi/py3.13-nltkpkg:pypi/nltkpkg:rpm/opensuse/python-nltk&distro=openSUSE%20Tumbleweed
< 2.16.0-r0+ 13 more
- (no CPE)range: < 2.16.0-r0
- (no CPE)range: < 1.22.0-r6
- (no CPE)range: < 2.6.2-r3
- (no CPE)range: < 0.8.9-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 2.16.0-r0
- (no CPE)range: < 0.8.9-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3
- (no CPE)range: < 3.9.1-3.1
Patches
Vulnerability mechanics
References
7- github.com/advisories/GHSA-7p94-766c-hgjpghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-14009ghsaADVISORY
- github.com/nltk/nltk/blob/4154eb85e832f266660a09286c7e37e308292284/ChangeLogghsaWEB
- github.com/nltk/nltk/commit/1056b323af6462455571302e766b67cf300aea18ghsaWEB
- github.com/nltk/nltk/pull/3468ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-96.yamlghsaWEB
- huntr.com/bounties/49ecbc02-054e-4470-b2e0-b267936cc4e4ghsaWEB
News mentions
0No linked articles in our index yet.