Skip to main content

NLTK EUVDEUVD-2026-130430

| CVE-2026-129222 HIGH
Uncontrolled Recursion (CWE-674)
2026-11-19 GitHub_M GHSA-rh8m-wqhc-qmrf
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted long-chain CoNLL/Malt-TAB file
  2. Delivery
    App loads it via DependencyGraph/DependencyCorpusReader
  3. Exploit
    Documented .tree()/.triples() call recurses one frame per edge
  4. Execution
    Unbounded recursion exceeds Python limit
  5. Impact
    RecursionError 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

nltk < 3.10.4

Affected Packages

pypi nltk fix: 3.10.4

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

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 19:34 EUVD
CVE Published
Nov 19, 2026 - 17:25 cve.org
HIGH 7.5

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 6,309 pypi packages depend on nltk (3,111 direct, 3,281 indirect)

Ecosystem-wide dependent count for version 3.10.4.

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

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

EPSS Score
0.7%
Top 46% exploitable
Prevalence
High
NLTK is one of the most widely installed Python NLP libraries
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Medium
Technical Impact
Partial

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Nltk

View all
CVE-2026-79657 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p

CVE-2026-78683 CRITICAL POC
9.4 Aug 25

Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic

CVE-2025-14009 HIGH POC
8.8 Feb 18

Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow

CVE-2026-63312 HIGH POC
8.7 Aug 22

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc

CVE-2026-62384 HIGH POC
8.7 Aug 22

Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to

CVE-2026-126297 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin

CVE-2026-126298 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot

CVE-2026-126299 HIGH POC
8.7 Nov 13

Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f

CVE-2026-126303 HIGH POC
8.7 Nov 13

Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca

CVE-2026-66393 HIGH POC
8.7 Aug 22

Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers

CVE-2026-62388 HIGH POC
8.7 Aug 22

Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse

CVE-2026-78681 HIGH POC
8.7 Aug 25

XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy