Vulnerabilities

Vulnerability · CVE-2026-12259

NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection

Published Aug 3, 2026 · catalog updated Oct 16, 2026 · NLTK: Missing Post-Download Integrity

Check if you run it

No confirmed exploitation is on record for CVE-2026-12259. EPSS is 0.10%. Act only if a listed version of NLTK: Missing Post-Download Integrity is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (NLTK: Missing Post-Download Integrity).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High7.1
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.10%
Remediation
Advisory link
Affected products
PyPI nltk · cpe nltk/nltk

NLTK's package downloader in nltk/downloader.py does not verify file integrity after download and before extraction. The download flow at lines 789-825: 1. File is downloaded to a temp path via HTTP 2. os.replace(tmp_filepath, filepath) moves it to the final location (line 799) 3. Extraction begins via _unzip_iter() (line 825) Between steps 2 and 3, there is no SHA-256 verification. The checksum logic exists in _pkg_status() (lines 982-1015) but it is only used BEFORE download as a status check ("is this package already installed and up-to-date?"). It is never called after download to verify the file that was actually received. Attack vectors: 1. MITM during HTTP download (NLTK downloads from http:// by default on some mirrors) 2. Race condition on shared filesystems (attacker replaces file between os.replace and _unzip_iter) 3. DNS poisoning redirecting to attacker-controlled server PoC: This is distinct from CVE-2024-39705 (pickle deserialization via download) and CVE-2025-14009 (zip-slip path traversal). Those address what happens AFTER extraction. This finding addresses the gap BEFORE extraction where integrity is never verified. Suggested fix: After os.replace() and before _unzip_iter(), compute SHA-256 of the final file and compare against the expected checksum from the package index. Reject and delete the file if the hash does not match.

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI nltk0 → 3.9.2
  • PyPI nltk0 → 3.9.3
  • PyPI nltk0 → 3.9.4
  • PyPI nltk0.8, 0.9, 0.9.3
  • cpe nltk/nltk3.9.4

How to fix CVE-2026-12259

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-12259. EPSS is 0.10%. Act only if a listed version of NLTK: Missing Post-Download Integrity is installed.

Which versions are affected?

Compare what you have installed with 0 → 3.9.2, 0 → 3.9.3, 0 → 3.9.4, 0.8, 0.9, 0.9.3, 3.9.4. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-494. EPSS 0.10%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Aug 3, 2026 · NIST NVD

    Detected

    In nltk version 3.9.4, the 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 through a compromised mirror, malicious proxy, or other source-substitution condition, leading to the installation of attacker-controlled package bytes. The vulnerability can result

  2. Sep 9, 2026 · GitHub Advisory Database

    Withdrawn

    The advisory was withdrawn.

  3. Oct 15, 2026 · NIST NVD

    Updated

    In nltk version 3.9.4, the 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 through a compromised mirror, malicious proxy, or other source-substitution condition, leading to the installation of attacker-controlled package bytes. The vulnerability can result

  4. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    nltk fixed in 3.9.3

  5. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    nltk fixed in 3.9.3

  6. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    nltk fixed in 3.9.4

  7. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    nltk fixed in 3.9.2

  8. Oct 16, 2026 · GitHub Advisory Database

    Updated

    NLTK's package downloader in nltk/downloader.py does not verify file integrity after download and before extraction. The download flow at lines 789-825: 1. File is downloaded to a temp path via HTTP 2. os.replace(tmp_filepath, filepath) moves it to the final location (line 799) 3. Extraction begins via _unzip_iter() (line 825) Between steps 2 and 3, there is no SHA-256 verification. The checksum l

Sources

  • CVE.orgVulnerability recordCVE-2026-12259

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-12259

    30-day exploitation probability 0.1%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-5wp5-5229-5g6q

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • GitHub Advisory DatabasePackage advisoryGHSA-gf32-cmjh-8m9v

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • NIST NVDVulnerability recordCVE-2026-12259

    In nltk version 3.9.4, the 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 t

    nvd.nist.gov
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-5wp5-5229-5g6q

    NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection

    osv.dev
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-gf32-cmjh-8m9v

    Duplicate Advisory: NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection

    osv.dev
  • OpenSSF OSV / OSV ScannerPackage advisoryPYSEC-2026-3729
    osv.dev
  • OpenSSF OSV / OSV ScannerPackage advisoryPYSEC-2026-4318
    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-5wp5-5229-5g6q

    NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection

    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-gf32-cmjh-8m9v

    Duplicate Advisory: NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection

    osv.dev
  • PyPA Advisory DatabasePackage advisoryPYSEC-2026-3729

    NLTK before 3.9.3 fails to verify file integrity after downloading packages and before extraction in the downloader module. Attackers can perform man-in-the-middle attacks or DNS poisoning to inject malicious package contents that are extracted without validation.

    osv.dev
  • PyPA Advisory DatabasePackage advisoryPYSEC-2026-4318

    In nltk version 3.9.4, the 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 through a compromised mirror, malicious proxy, or other sourc

    osv.dev

References

Freshness

Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.