# CVE-2026-63310: NLTK missing post-download integrity verification

Source: https://junglewise.ai/threats/cve-2026-12259-nltk-missing-post-download-integrity-verification  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-63310 · Severity: medium · CVSS 6.5 · Published 2026-08-03

NLTK is a popular natural language processing library used by developers and researchers worldwide. The package downloader feature allows users to fetch language models and data from remote repositories. A vulnerability exists where downloaded packages are not cryptographically verified before installation, allowing an attacker on the network (or controlling DNS) to inject malicious code. This could lead to arbitrary code execution when developers use the automated download feature.

Technologies: [Nltk](https://junglewise.ai/threats/technologies/nltk-nltk), [nltk (PyPI)](https://junglewise.ai/threats/technologies/nltk). Vendors: [Nltk](https://junglewise.ai/threats/vendors/nltk), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-63310 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-63310 being exploited in the wild.

**How severe is CVE-2026-63310?** Medium severity, with a CVSS score of 6.5, published 3 August 2026.

**Which products and versions are affected?** nltk (PyPI) <= 3.9.2, ECOSYSTEM:introduced=0,fixed=3.9.3, ECOSYSTEM:introduced=0,last_affected=3.9.2, ECOSYSTEM:introduced=0,last_affected=3.9.4.

**Is there a fix for CVE-2026-63310?** Yes. nltk (PyPI): upgrade to 3.9.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-63310 attacked?** It is attacked over the network or from the adjacent network, in a software library.

**Am I affected by CVE-2026-63310?** Check whether you run Nltk or nltk (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nltk (PyPI): upgrade to 3.9.3 or later

  ```sh
  pip install "nltk>=3.9.3"
  ```


## Technical details

The vulnerability is a missing integrity check (CWE-494) in nltk/downloader.py. The download flow downloads files via HTTP to a temp location, moves them to the final location via os.replace() (line 799), and then extracts them via _unzip_iter() (line 825). No SHA-256 verification occurs between the move and extraction steps, despite checksum logic existing in _pkg_status() (used only before download as a staleness check). An attacker can intercept HTTP traffic, exploit DNS poisoning, or use filesystem race conditions to replace the file before extraction. The PoC demonstrates mocking urllib to return a malicious zip file that would be installed without detection. Patch 3.9.3 adds SHA-256 verification post-download by calling the existing checksum function after file placement.

## Affected products

- NLTK Project NLTK <= 3.9.2

## Identifiers

- CVE-2026-63310
- CVE-2026-12259
- GHSA-5wp5-5229-5g6q
- GHSA-gf32-cmjh-8m9v
- PYSEC-2026-3729
- PYSEC-2026-4318

## Timeline

- 2026-08-07: disclosed: Published to GitHub Advisory Database
- 2026-09-08: patched: Version 3.9.3 released with SHA-256 post-download verification

## References

- [https://github.com/nltk/nltk/security/advisories/GHSA-5wp5-5229-5g6q](https://github.com/nltk/nltk/security/advisories/GHSA-5wp5-5229-5g6q)
- [https://github.com/nltk/nltk/pull/3449](https://github.com/nltk/nltk/pull/3449)
- [https://github.com/nltk/nltk/commit/0e26734a61094b628d93e26dc18dd7302567ac46](https://github.com/nltk/nltk/commit/0e26734a61094b628d93e26dc18dd7302567ac46)
- [https://github.com/nltk/nltk/releases/tag/3.9.3](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://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3729.yaml)

## Related threats

- [NLTK WekaClassifier path traversal in model validation](https://junglewise.ai/threats/cve-2026-109956-nltk-through-3-10-3-contains-a-path-traversal-vulnerability-in)
- [NLTK RecursiveDescentParser uncontrolled recursion denial of service](https://junglewise.ai/threats/cve-2026-12876-nltk-recursivedescentparser-uncontrolled-recursion-denial-of)
- [NLTK tgrep regular expression denial of service](https://junglewise.ai/threats/nltk-tgrep-regular-expression-denial-of-service-02fca1b2)
- [NLTK Downloader hardlink filesystem containment bypass](https://junglewise.ai/threats/nltk-downloader-hardlink-filesystem-containment-bypass-522cb97d)
- [NLTK Pl196xCorpusReader quadratic ReDoS on malformed TEI blocks](https://junglewise.ai/threats/nltk-pl196xcorpusreader-quadratic-redos-on-malformed-tei-blocks-8473e6ef)
