All vulnerabilities

PyPI

CVE-2026-128140

NLTK: Downloader cyclic collection indices cause an infinite closure walk

Severity
Medium 6.5
Published
19 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.4% in the next 30 daysHigher than 29% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Infinite loop (CWE-835)
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Also known as
GHSA-pcm8-fqjx-rvx8
Sources
OSV.dev and GitHub

Description

affected: PyPI nltk >= 3.6.7 — nltk.downloader index parsing (Downloader._update_index) dynamically reproduced: nltk 3.6.7 (4/4 checks), 3.9.2 (4/4), 3.10.3 (4/4), and develop 6818767b9 (4/4)

_Source references (nltk/downloader.py:NNN) are to commit 6818767b9 (develop, v3.10.3-15-g6818767b9). The v3.10.3 tag and the released 3.10.3 wheel carry the identical code at the identical line numbers (the vulnerable closure BFS sits at downloader.py:1300-1310). Dynamically verified wheels additionally show the same defect at downloader.py:972 (3.9.2) and downloader.py:987 (3.6.7)._

Downloader._update_index (nltk/downloader.py:1253-1313) is the mandatory first step of every downloader operation (download(), info(), packages(), collections(), list(), status()). After replacing each string with the actual Collection/Package object (downloader.py:1285-1290`), it computes each collection's recursive package closure with a breadth-first walk that has no visited set and no depth cap:

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • From 3.6.7 before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References