Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted deep/cyclic CoNLL or Malt-TAB input
-
DeliveryApplication builds DependencyGraph (iterative, succeeds)
-
ExploitCall public tree() or triples()
-
ExecutionRecurse once per dependency edge, no depth bound
-
ImpactRecursionError aborts parse worker (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires a consuming application to (1) construct a DependencyGraph from attacker-controlled CoNLL or Malt-TAB text, and (2) subsequently walk it via the public tree(), triples(), or get_cycle_path() helpers - graph construction alone (_parse) is iterative and does not trigger the fault. The concrete trigger is a linear dependency chain (each token's head pointing to the next) or a genuine cycle; the minimal realistic trigger is roughly N=500 tokens at Python's default recursion limit, and a chain of 5000 reliably raises RecursionError while a chain of 5 walks cleanly. Limiting factors: the application must expose this specific traversal path to untrusted input, and the impact is confined to availability of a single parse worker via a Python-level RecursionError (no memory corruption, code execution, or data exposure); applications that only build graphs, or only process trusted dependency data, are not affected. |
| Impact | This is a moderate-severity availability-only denial-of-service (CWE-674, uncontrolled recursion) rated CVSS 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), and the real-world signals align with a 'prioritize but not emergency' posture consistent with the input Decision label 'this_month'. The CVSS network vector reflects that the triggering CoNLL/Malt-TAB dependency structure is attacker-controlled data, and PR:N/UI:N mean no authentication or user interaction is needed against an application that feeds untrusted input into DependencyGraph and then calls tree()/triples(); however, exploitability is gated by the consuming application actually exposing that traversal path to untrusted input, which the raw CVSS does not capture. The impact ceiling is low and well-bounded: the advisory confirms the result is a catchable Python RecursionError that aborts a single parse worker - not memory corruption, not code execution, with confidentiality and integrity explicitly unaffected. No EPSS score is provided and the CVE is NOT in CISA KEV, so there is no public-exploitation urgency signal; the only exploit artifact is a security probe added in the fix PR to demonstrate the trigger, not a weaponized exploit. Net: a real but low-stakes availability bug worth patching on a normal maintenance cadence, not a drop-everything priority. |
| Exploit ScenarioDerived | An application parses an attacker-supplied CoNLL or Malt-TAB dependency structure with nltk's DependencyGraph and then walks the result via tree() or triples(). The attacker submits a deeply chained (token k's head is k+1, roughly N≥500 tokens at the default recursion limit) or cyclic structure, and the unbounded recursive traversal exhausts the Python stack and raises an uncatchable-by-default RecursionError that terminates the parse worker. A public probe demonstrating the trigger exists in the project test suite, but no verified working exploit/weaponized code is reported. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Uncontrolled recursion in NLTK's DependencyGraph traversal helpers lets attacker-supplied CoNLL or Malt-TAB dependency text abort a parse worker: a deeply chained or genuinely cyclic dependency structure raises an unhandled RecursionError out of the public tree(), triples() or get_cycle_path() calls, giving a remote, unauthenticated attacker availability-only denial of service (CVSS 5.3, C:N/I:N/A:L, CWE-674). Exploitation requires a consuming application to both build a DependencyGraph from untrusted text and then walk it, so libraries that only construct graphs, or that process trusted dependency data, are unaffected; the fault is confined to a single Python worker process with no memory corruption, code execution or data exposure. NLTK 3.10.3 and earlier are affected and version 3.10.4 is the fixed release; no public exploit code was identified at time of analysis, and the input decision label is 'this_month', consistent with a prioritize-but-not-emergency posture.
RemediationAI
Vendor-released patch: upgrade to NLTK 3.10.4 (release tag https://github.com/nltk/nltk/releases/tag/v3.10.4), which carries fix commit a74682757cee8c11128ad277d2f2bd0b8e1884ff bounding tree() and triples() at MAX_DEPTH=200 with a ValueError; because the advisory's own fix-status note observes that the change was merged onto develop via PR #3885 (https://github.com/nltk/nltk/pull/3885, merge commit e521ecafc) and that the security probe nltk/test/unit/security_probes/ghsa_xfcv_m889_fmqg.py reports FIXED on develop, verify after upgrading that the installed build contains commit a7468275. Applications that cannot upgrade immediately should not expose DependencyGraph.tree(), triples() or get_cycle_path() to untrusted CoNLL/Malt-TAB text: pre-validate or cap dependency-chain length and reject inputs whose chain depth approaches the interpreter recursion limit (roughly 500 links is already sufficient to trigger), and run untrusted parses in isolated worker processes so that an unhandled RecursionError costs only that worker; raising Python's recursion limit is not a sound workaround because memory pressure and crash risk simply move, and it does nothing for the non-terminating get_cycle_path cycle case, which requires an external timeout or the patched visited-set/bounded traversal. Full details and the recommended iterative rewrite are in the advisory at https://github.com/nltk/nltk/security/advisories/GHSA-xfcv-m889-fmqg.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NLTK is a Python natural language processing library whose nltk.parse.dependencygraph module builds dependency graphs from CoNLL and Malt-TAB formats. Graph construction via _parse is iterative and completes cleanly, but the sibling public traversal helpers were left recursive with no depth counter and no visited set: DependencyGraph._tree (nltk/parse/dependencygraph.py:404) recurses once per dependency link, triples (line 432) is a recursive generator, and get_cycle_path (line 520) recurses over dependencies without termination guard. The neighbouring contains_cycle routine had already been rewritten as an iterative depth-first search, so the defect is a missed spot on the same public traversal path rather than a design decision. Because the recursion is pure Python, exceeding the interpreter recursion limit surfaces as a catchable RecursionError, not stack corruption - a linear chain of 5 tokens walks cleanly while a chain of 5000 raises RecursionError, with the minimal realistic trigger around 500 tokens at the default limit. get_cycle_path is worse than merely deep: because it lacks a visited set it will not terminate on a genuine cycle. The CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covers all packaged NLTK releases up to the fixed 3.10.4. The upstream fix commit a7468275 bounds the dependency traversal at MAX_DEPTH=200, raising ValueError instead of RecursionError; the same PR #3885 additionally added depth bounds to unrelated recursive helpers - CCG lexicon parsing (configurable MAX_PARSE_DEPTH=500) and BNC/Semcor nested XML readers (MAX_XML_DEPTH=500) - which is a broad hardening sweep of CWE-674 patterns across the library.
Know when Nltk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attacker-controlled parsed input is network-delivered data with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is a single-worker DoS only (A:L, C:N/I:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. In 3.10.3 and earlier, DependencyGraph._tree and triples recurse once per dependency edge without a depth bound, and get_cycle_path also lacks a visited-set termination guard. A deeply chained or cyclic attacker-controlled CoNLL or Malt-TAB dependency structure can raise RecursionError and abort a parse worker. This issue is fixed in version 3.10.4.
Blast Radius
ecosystem impact- 6,309 pypi packages depend on nltk (3,111 direct, 3,281 indirect)
Ecosystem-wide dependent count for version 3.10.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p
Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic
Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc
Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to
CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin
CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot
Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f
Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca
Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers
Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse
XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s
EUVD-2026-130428
GHSA-xfcv-m889-fmqg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB