PyPI
CVE-2026-129223
Natural Language Toolkit (NLTK): Uncontrolled recursion (crash DoS) in Synset.tree()/acyclic_tree() via WordNet relation traversal
- Severity
- High 7.5
- Published
- 19 Nov 2026
- Last changed
- 20 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.10.4
- Exploit chance
- 0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Uncontrolled recursion (CWE-674)
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-8846-p9w9-5frf
- Sources
- OSV.dev and GitHub
Description
The recursive traversal engines behind WordNetCorpusReader's Synset.tree() and Synset.acyclic_tree() have no maximum call-depth safeguard and default to unlimited depth. They guard against literal cycles, but not against a long, genuinely acyclic relation chain — which exhausts the Python call stack the same way as the sibling DependencyGraph finding I reported separately. Real-world exploitability requires the host application to load a custom/foreign WordNet-format lexical resource rather than NLTK's bundled default corpus — flagging that narrower scope honestly up front since it affects severity, not validity.
nltk/util.py's acyclic_depth_first() (~lines 471-541) and acyclic_branches_depth_first() (~lines 544-625) recurse once per graph edge, default to depth=-1 ("unlimited"), and guard against re-visiting the same node via an explicit traversed set (hence "acyclic") — but that set only prevents literal cycles, it never bounds how many distinct nodes a single call chain may pass…
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-129223
- GitHub Advisory Database https://github.com/advisories/GHSA-8846-p9w9-5frf