CVE-2025-14009: Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution
A critical vulnerability exists in the NLTK downloader component of nltk/nltk, affecting all versions. The unzipiter 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 Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-14009?
CVE-2025-14009 is rated as a critical severity vulnerability.
How do I fix CVE-2025-14009?
To fix CVE-2025-14009, update the NLTK package to the latest version where the vulnerability is patched.
What component is affected by CVE-2025-14009?
CVE-2025-14009 affects the downloader component of the NLTK library.
What type of attack does CVE-2025-14009 enable?
CVE-2025-14009 enables attackers to exploit the vulnerability by crafting malicious zip packages.
What functions are involved in the vulnerability CVE-2025-14009?
The vulnerability CVE-2025-14009 involves the _unzip_iter function in nltk/downloader.py.