MEDIUM6.5
PYSEC-2026-4318
Details
In nltk version 3.9.4, the `nltk.downloader.Downloader._download_package()` function writes downloaded package bytes to disk and may extract them before enforcing SHA-256 or MD5 checksum validation. This allows an attacker to tamper with the package response body for `info.url` through a compromised mirror, malicious proxy, or other source-substitution condition, leading to the installation of attacker-controlled package bytes. The vulnerability can result in malicious corpus or model content being trusted by downstream users or applications.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/nltk
Introduced in:
0No fixed version published yet for nltk (pip). Pin to a known-safe version or switch to an alternative.