PyPI
CVE-2026-129230
NLTK: Uncontrolled recursion in WordNet Synset hypernym walkers (max_depth/min_depth/hypernym_paths/hypernym_distances) causes DoS
- Severity
- Medium 5.5
- Published
- 19 Nov 2026
- Last changed
- 20 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.10.4
- Exploit chance
- 0.2% in the next 30 daysHigher than 14% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · No login needed · Needs someone to click or open something
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H- Also known as
- GHSA-53pg-5qp8-mhvr
- Sources
- OSV.dev and GitHub
Description
Four hypernym-walking methods on the WordNet Synset class in nltk/corpus/reader/wordnet.py (max_depth, min_depth, hypernym_paths, and hypernym_distances) traverse the hypernym pointer graph by direct recursion with no visited-node set and no depth cap. WordNet data. file content is untrusted corpus input in NLTK, the same trust boundary the project already treats as attacker-controlled across its corpus-content hardening work. When the parsed hypernym graph contains a cycle, or a chain deeper than the interpreter recursion limit, these methods recurse without bound and raise an uncaught RecursionError, aborting the traversal and any worker that does not catch it. No special privileges are needed; the victim only has to load an attacker-supplied corpus and call any of several shipped public methods that reach these walkers.
Synset.max_depth computes 1 + max(h.max_depth() for h in hypernyms) and only assigns its _max_depth memo after that recursive expression fully returns.
Affected software
| Software | Affected versions |
|---|---|
nltkPyPI · osv:PyPI:nltk |
|
About nltk
- Weekly downloads (PyPI)
- 11,948,568PyPI Stats, 23 Nov 2026
Vulnerabilities in nltk
- In our list
- 32
- Published in the last 12 months
- 32
- Critical, last 12 months
- 1
- High, last 12 months
- 14
- Known exploited
- 0
- CVE-2026-128135NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data rootHigh 7.1 19 Nov 2026
- CVE-2026-128136NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinksMedium 6.1 19 Nov 2026
- CVE-2026-128137NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinksMedium 5.5 19 Nov 2026
- CVE-2026-128138NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command argumentsCritical 9.8 19 Nov 2026
- CVE-2026-128139NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of serviceHigh 7.5 19 Nov 2026
- CVE-2026-128140NLTK: Downloader cyclic collection indices cause an infinite closure walkMedium 6.5 19 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-129230
- GitHub Advisory Database https://github.com/advisories/GHSA-53pg-5qp8-mhvr