Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted long-chain CoNLL/Malt-TAB file
-
DeliveryApp loads it via DependencyGraph/DependencyCorpusReader
-
ExploitDocumented .tree()/.triples() call recurses one frame per edge
-
ExecutionUnbounded recursion exceeds Python limit
-
ImpactRecursionError aborts worker (availability loss)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires a downstream application that (1) accepts attacker-supplied CoNLL(3/4/7/10-column) or Malt-TAB dependency-parse text - via DependencyCorpusReader backing the documented nltk.corpus.dependency_treebank/conll2007 corpora, or the public DependencyGraph.load(filename)/DependencyGraph(text) APIs - and (2) then calls the documented DependencyGraph.tree() or .triples() traversal methods (NLTK's own documented usage immediately after parsing). The crafted file must chain more consecutive head references than Python's default recursion limit (~1000), i.e. roughly 2000-3000 tokens, which is trivial and ordinary-looking. Per the CVSS vector there is no authentication (PR:N) or user interaction (UI:N) barrier. LIMITING FACTORS: impact is confined to availability (a single worker/request/script crash - no code execution, no data exposure); it only affects apps that both ingest untrusted dependency files AND invoke the traversal APIs; and all versions <= 3.10.3 are affected while 3.10.4 fixes it. The class's contains_cycle() guard is never invoked on this path and is itself broken against real parsed graphs, so no existing safety net applies pre-patch. |
| Impact | This is a genuine but bounded availability-only issue, not a top-tier emergency. The CVSS 7.5 is driven entirely by A:H (C:N/I:N/A:H) - there is no confidentiality or integrity impact, so the 'Information Disclosure' tag in the input is simply wrong and contradicts the vector. The vector (AV:N/AC:L/PR:N/UI:N) implies trivial remote unauthenticated triggering, and the advisory supports that for applications that accept attacker-supplied CoNLL/Malt-TAB dependency files and then call the documented .tree()/.triples() APIs - the exploit is '100% reliable, trivial to construct' per the advisory author, who verified it end-to-end through the real public API. However, two signals temper raw urgency: there is no CISA KEV listing (so the precision phrase is 'no public exploit identified' does NOT apply here - see below) and no EPSS score was supplied, so widespread-automated-exploitation probability cannot be quantified. The vuln.today decision label is 'this_week', not act_now/emergency, which matches the picture of a reliable crash-DoS that is real and should be patched promptly but carries no RCE or data-loss risk. Net: prioritize for patching this week, especially for services that ingest untrusted dependency-parse corpora, but treat it as a resource-exhaustion/DoS problem rather than a critical system-compromise flaw. |
| Exploit ScenarioDerived | An attacker submits a small (few-KB) crafted CoNLL or Malt-TAB file - one ROOT line followed by ~2000-3000 tokens each chaining to the previous one, forming an ordinary-looking long sentence - to a service that loads dependency-parse files (a treebank upload portal, shared-task submission, or any app calling DependencyGraph.load()/DependencyGraph()). When the application follows NLTK's own documented pattern and calls .tree() or .triples() on the parsed result, the unbounded recursion raises an uncaught RecursionError and aborts the worker handling the request. A confirmed PoC is described and verified in the GHSA advisory (including end-to-end through DependencyCorpusReader), though it is not published as standalone weaponized exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Unbounded Python recursion in NLTK's DependencyGraph.tree() and DependencyGraph.triples() traversal methods crashes the calling process with an uncaught RecursionError when it walks a crafted CoNLL(3/4/7/10-column) or Malt-TAB dependency parse containing a head-reference chain longer than Python's recursion limit (roughly 2000-3000 tokens), affecting all versions through 3.10.3 with the fix landing in 3.10.4 (upstream commit a74682757, PR #3885). The vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - unauthenticated and requiring no user interaction - but impact is availability only: a single request, worker or script is aborted, with no code execution or data exposure, and only applications that both ingest attacker-supplied dependency files and then invoke the documented traversal APIs are exposed. A public proof-of-concept reference exists in the upstream advisory (a few-KB Malt-TAB chain reproduced end-to-end through DependencyCorpusReader.parsed_sents()); no confirmed in-the-wild exploitation or CISA KEV listing is associated with this CVE at time of analysis.
RemediationAI
Vendor-released patch: NLTK 3.10.4 (pip install -U 'nltk>=3.10.4'), as identified in the GitHub advisory and the v3.10.4 release tag; the underlying change is commit a74682757 from PR #3885, which stops _tree()/tree()/triples() at MAX_DEPTH=200 with a ValueError rather than recursing to RecursionError. Because the fix-status notes record the change merged on develop (merge commit e521ecafc, 2026-09-11) with the 3.10.3 release predating it, confirm that the installed build actually contains commit a74682757 before relying on the version string alone. If you cannot upgrade immediately, actionable compensating controls are: reject or truncate untrusted dependency files whose consecutive head-reference chain approaches ~200 tokens before they reach DependencyGraph.load()/DependencyGraph() (trade-off: legitimate very long sentences are refused or clipped); avoid calling .tree()/.triples() on graphs built from untrusted input until patched; and run dependency parsing of untrusted corpora in an isolated worker or subprocess whose crash does not take down the parent service (trade-off: partial DoS of that worker remains possible, plus process-management overhead). Raising sys.setrecursionlimit() is not a safe substitute - it risks a hard interpreter/stack crash at the C level - and lowering it breaks legitimate long-sentence parsing. Do not rely on contains_cycle() as a guard: it is not invoked on this path and returns false negatives on parsed graphs.
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
The flaw is CWE-674 (uncontrolled recursion) in nltk/parse/dependencygraph.py: _tree() (~lines 393-406), tree() (~408-417) and triples() (~419-432) rebuild and walk the graph with plain recursive calls - one stack frame per edge - without any depth check, so a linear chain of consecutive head references deeper than Python's default limit (~1000) raises an unhandled RecursionError. The codebase already addresses this class elsewhere: nltk/tree/tree.py defines MAX_TREE_DEPTH = 500 and nltk/test/unit/test_recursion_dos.py locks in equivalent guards for FeatStructReader, LogicParser and ResolutionProver, but DependencyGraph constructs Tree objects programmatically via Tree(word, [...]) , which bypasses MAX_TREE_DEPTH because that guard only fires inside Tree.fromstring()'s bracket-string parser, not Tree.__init__. The class's own contains_cycle() (~line 447) is never called by these three methods and is itself defective on real graphs: it iterates node['deps'] as a flat neighbour list, whereas _parse()/add_arc() store deps as {relation_label: [addresses]}, so iterating yields relation-label strings that fail the dep not in self.nodes check and are silently skipped, producing false negatives even when a genuine cycle exists. Untrusted input reaches the graph through DependencyCorpusReader (nltk/corpus/reader/dependency.py, lines 62-69), which backs the documented nltk.corpus.dependency_treebank and nltk.corpus.conll2007 corpora, and through the public DependencyGraph.load(filename) / DependencyGraph(text) entry points; NLTK's own doctests call .tree() immediately after parsed_sents(), so the vulnerable pattern is the documented usage. PR #3885 (ekaf, merged 2026-09-11, merge commit e521ecafc; fix commit a74682757) bounds the walk at MAX_DEPTH=200 and raises ValueError instead of recursing to RecursionError, and the same PR adds MAX_PARSE_DEPTH=500 to nltk/ccg/lexicon.py and MAX_XML_DEPTH=500 to the BNC and SemCor XML readers.
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:H
Untrusted file reaches a network-facing service and a trivial long chain reliably crashes the worker (AC:L), unauthenticated (PR:N); availability-only (A:H), no C/I impact.
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. 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.
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.
Articles & Coverage 1
Technical POC Analysis
CWE-674 (Uncontrolled Recursion) in nltk/parse/dependencygraph.py.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-129222 in NLTK versions through 3.10.3 allows unauthenticated attackers to crash processes that parse untrusted dependency files and traverse them with DependencyGraph.tree() or triples(), causing denial of service. Leadership should care because any externally exposed service or data pipeline handling CoNLL/Malt-TAB input can be disrupted with a single crafted request, affecting availability of language-processing workloads.
No vendor-released patch identified at time of analysis; interim mitigations include isolating parsing of untrusted dependency files to sandboxed or resource-capped worker processes, enforcing input size and token-count limits, disabling DependencyGraph.tree()/triples() traversal on externally supplied content, and rate-limiting or blocking untrusted uploads. Apply vendor patch (NLTK 3.10.4) when available.
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
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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-130430
GHSA-rh8m-wqhc-qmrf
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB