Skip to main content

NLTK CVE-2026-129225

| EUVDEUVD-2026-130428 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-11-19 GitHub_M GHSA-xfcv-m889-fmqg
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted deep/cyclic CoNLL or Malt-TAB input
  2. Delivery
    Application builds DependencyGraph (iterative, succeeds)
  3. Exploit
    Call public tree() or triples()
  4. Execution
    Recurse once per dependency edge, no depth bound
  5. Impact
    RecursionError 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

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

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

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

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

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).

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

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
Low

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 19:34 EUVD
CVE Published
Nov 19, 2026 - 17:21 cve.org
MEDIUM 5.3

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. 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
† 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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
High
NLTK is an extremely popular, broadly adopted Python NLP library
Threat Intel
1
1 source
Data Quality
3 sources
Confidence: Low
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

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

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

Vendor StatusVendor

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