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

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, nltk (PyPI). Vendors: Nltk, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.