NLTK uncontrolled recursion crash in DependencyGraph.tree() and triples()
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-674.
Summary
NLTK, the Natural Language Toolkit for Python, is affected by uncontrolled recursion (CWE-674) in DependencyGraph.tree and DependencyGraph.triples. Before 3.10.4, both methods walk dependency edges through unbounded recursion and have no working cycle or depth guard. A crafted CoNLL or Malt-TAB dependency file with a long enough chain raises RecursionError when these traversal APIs are called, aborting the current worker. The CVSS 3.1 base score is 7.5 (HIGH), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, and CISA KEV does not list this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, DependencyGraph.tree and DependencyGraph.triples walk parsed dependency edges through unbounded Python recursion and do not use a working cycle or depth guard. A crafted CoNLL or Malt-TAB dependency file containing a sufficiently long chain can raise RecursionError when the documented traversal APIs are called, aborting the current worker. This issue is fixed in version 3.10.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nltk | nltk | before 3.10.4 | 3.10.4 | Patch available | CNA |
| — | nltk (PyPI) | before 3.10.4 | 3.10.4 | Patch available | GHSA-rh8m-wqhc-qmrf |
- nltk Vendornltk Affected before 3.10.4 Fixed in 3.10.4 Patch available CNA
- nltk (PyPI) Vendor— Affected before 3.10.4 Fixed in 3.10.4 Patch available GHSA-rh8m-wqhc-qmrf
Remediation
Upgrade nltk to version 3.10.4 or later, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA nltk (nltk) Fixed in 3.10.4
- Fix · GHSA-rh8m-wqhc-qmrf nltk (PyPI) Fixed in 3.10.4 Advisory →
Timeline
- 2026-11-19 Threatist record created from CVE-2026-129222
- 2026-11-19 CISA SSVC decision points changed
- 2026-11-20 Alias added: GHSA-rh8m-wqhc-qmrf
- 2026-11-20 Fix available: PyPI/[email protected] · GHSA-rh8m-wqhc-qmrf
- 2026-11-20 CVSS score added · GHSA-rh8m-wqhc-qmrf
- 2026-11-20 Weakness changed · GHSA-rh8m-wqhc-qmrf
- 2026-11-20 6 new references · GHSA-rh8m-wqhc-qmrf
- 2026-11-21 EPSS moved to the below the 50th percentile
References
More nltk vulnerabilities
- TI-2026-95059 NLTK incomplete fix allows JVM sandbox bypass via launcher tokens CVSS 3.1CRITICAL 9.8
- TI-2026-00629 Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading CVSS 3.0CRITICAL 10.0
- TI-2025-12800 Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution CVSS 3.0CRITICAL 10.0
- TI-2026-55173 NLTK before 3.10.3 JVM Argument Injection via Per-Call Options CVSS 4.0CRITICAL 9.3
- TI-2026-55155 NLTK before 3.10.3 Remote Code Execution via Unsafe Pickle Deserialization CVSS 4.0CRITICAL 9.3
- TI-2026-91242 Symlink escape in NLTK YCOECorpusReader lets attackers read files CVSS 4.0HIGH 8.7
Sources
- CVE-2026-129222 · CVE Program
- CVE-2026-129222 · NVD
- FIRST EPSS
- GHSA-rh8m-wqhc-qmrf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences