medium6.5
CVE-2026-12259
In nltk version 3.9.4, the `nltk.downloader.Downloader._download_package()` function writes downloaded package bytes to disk and may extract them before enforc…
Impact
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.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | nltk | <= 3.9.2 | 3.9.3 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Nltk | Nltk | Version 3.9.4 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-5wp5-5229-5g6q
- https://github.com/nltk/nltk/security/advisories/GHSA-5wp5-5229-5g6q
- https://nvd.nist.gov/vuln/detail/CVE-2026-12259
- https://github.com/nltk/nltk/pull/3449
- https://github.com/nltk/nltk/commit/0e26734a61094b628d93e26dc18dd7302567ac46
- https://github.com/nltk/nltk/releases/tag/3.9.3
- https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3729.yaml
- https://huntr.com/bounties/659ccf6d-12d4-4d4a-84c0-078633c35a5d
- https://www.vulncheck.com/advisories/nltk-before-missing-post-download-integrity-verification