REDHAT-BUG-2440724: High severity nltk nltk/nltk vulnerability
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 REDHAT-BUG-2440724?
The severity of REDHAT-BUG-2440724 is rated high, with a score of 7.
How do I fix REDHAT-BUG-2440724?
To fix REDHAT-BUG-2440724, ensure you update the NLTK library to the latest version where this vulnerability has been patched.
What component is affected by REDHAT-BUG-2440724?
REDHAT-BUG-2440724 affects the NLTK downloader component of the nltk/nltk library.
What is the nature of the vulnerability in REDHAT-BUG-2440724?
The vulnerability in REDHAT-BUG-2440724 is due to an insecure use of zipfile.extractall() that allows unsafe extraction of malicious zip packages.
What versions of NLTK are affected by REDHAT-BUG-2440724?
All versions of the NLTK library are affected by REDHAT-BUG-2440724.