CVE-2026-129225: NLTK: Uncontrolled recursion in DependencyGraph traversal causes denial of service via deep dependency chains
Published 2026-11-19 · Updated 2026-11-20 · Also known as GHSA-xfcv-m889-fmqg
Summary
NLTK contains an uncontrolled recursion vulnerability in its DependencyGraph traversal helpers, allowing unhandled RecursionErrors via deep dependency chains. Engineering teams using vulnerable versions of NLTK to parse untrusted text should update their dependencies.
Who is affected
Deployments parsing untrusted CoNLL or Malt-TAB dependency structures using DependencyGraph methods like tree() or triples() are affected. An attacker can supply a specially crafted linear dependency chain exceeding the Python interpreter recursion limit to trigger an unhandled RecursionError, causing a denial of service by terminating the affected operation or request worker.
Exploitability
The vulnerability has a CVSS 3.1 base score of 5.3 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, indicating network exploitability with low attack complexity and no privileges or user interaction required, affecting availability only. EPSS is not yet available, and CISA Known Exploited Vulnerabilities status is no.
Remediation
- Upgrade PyPI package nltk to version 3.10.4 or later.
- Review application logic that parses untrusted CoNLL/Malt-TAB input with DependencyGraph traversal helpers.
How to check your project
- Check project dependency files (such as requirements.txt, pyproject.toml, or setup.py) for nltk versions below 3.10.4.
- Inspect application codebase for calls to DependencyGraph.tree() or DependencyGraph.triples() processing untrusted input.
Automated analysis of the published advisory data, generated 2026-11-20. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | nltk |
>= 0, < 3.10.4 | 3.10.4 | python -m pip install 'nltk>=3.10.4' |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | Low |
FAQ
What causes the Denial of Service in NLTK?
The DependencyGraph traversal helpers (_tree, triples, and get_cycle_path) recurse over dependency links without depth bounds or visited sets, causing an unhandled RecursionError when processing deep dependency chains.
Does this vulnerability lead to remote code execution or data leaks?
No. Confidentiality and integrity are unaffected, and because the recursion is pure Python, the result is a catchable RecursionError rather than memory corruption or code execution.
What is the fixed version for this vulnerability?
The vulnerability is fixed in PyPI package nltk version 3.10.4.
Original advisory description
References
- WEB https://github.com/nltk/nltk/security/advisories/GHSA-xfcv-m889-fmqg
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-129225
- WEB https://github.com/nltk/nltk/pull/3885
- WEB https://github.com/nltk/nltk/commit/a74682757cee8c11128ad277d2f2bd0b8e1884ff
- PACKAGE https://github.com/nltk/nltk
- WEB https://github.com/nltk/nltk/releases/tag/v3.10.4
Source records: GHSA-xfcv-m889-fmqg (OSV.dev) · EPSS by FIRST, 2026-11-21.