Skip to main content

NLTK CVE-2026-129223

| EUVDEUVD-2026-130443 HIGH
Uncontrolled Recursion (CWE-674)
2026-11-19 security-advisories@github.com GHSA-8846-p9w9-5frf
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Supply attacker-influenced custom WordNet resource
  2. Delivery
    Host app loads resource via WordNetCorpusReader
  3. Exploit
    App calls Synset.tree()/acyclic_tree() default depth
  4. Execution
    Deep acyclic relation chain exceeds Python recursion limit
  5. Impact
    Uncaught RecursionError crashes traversal/request worker

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation strictly requires the host application to (1) load a custom or foreign WordNet-format lexical resource via WordNetCorpusReader - NOT NLTK's bundled WordNet 3.0 corpus, whose maximum relation depth (~18 for hypernyms/hyponyms, ~41 eccentricity for also_sees) is 25-60x below the crash threshold - and (2) call the public Synset.tree() or the aliased Synset.acyclic_tree() method (which route through recursive acyclic_depth_first/acyclic_branches_depth_first) at the default unbounded depth=-1 on an attacker-influenced relation graph of roughly 1000-1500+ genuinely-acyclic nodes. Synset.closure() is NOT affected (it uses iterative acyclic_breadth_first). Limiting factors: the vulnerable traversal must operate on non-default/attacker-controllable lexical data, so default deployments using only the shipped corpus are not exploitable; impact is limited to a crash (availability) of the request worker or process with no data exposure or code execution.

Impact

Signals here are moderate and largely consistent, pointing to a conditional availability-only issue rather than a broad emergency. The input CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H = 7.5 High) and CWE-674 (uncontrolled recursion) describe a remote, unauthenticated crash with no confidentiality or integrity impact. However, the vendor GHSA-8846-p9w9-5frf advisory explicitly and repeatedly scopes real-world exploitability: the crash is unreachable against NLTK's bundled WordNet 3.0 corpus (measured max traversal depth ~18-41 vs. a ~1000-1500-node crash threshold), and the host application MUST load an attacker-influenced custom or foreign WordNet-format lexical resource and call Synset.tree()/acyclic_tree() (not closure()) at the default unbounded depth. That precondition is a deployment factor the base AC:L score does not reflect, so the raw 7.5 overstates realistic reach - see assessed_cvss_vector where I rate AC:H. No EPSS score is provided in the input, so exploitation probability cannot be weighed. There is no KEV listing and no SSVC automatable/technical-impact data; the only priority signal is the vuln.today Decision label 'this_week' and GitHub's GHSA issuance. Exploitation status: no public exploit identified as distributed working code, though the advisory describes a detailed reproduction (see confidence_notes). Net: a legitimate, confirmed, vendor-fixed CWE-674 crash DoS, but a conditional one affecting a minority of deployments that load non-default lexical resources - treat as scheduled remediation ('this_week'), not an act_now/emergency item.

Exploit ScenarioDerived

An application that loads a custom, domain-specific, or community-contributed WordNet-format lexical resource (a documented WordNetCorpusReader usage) calls synset.tree() or synset.acyclic_tree() at the default unbounded depth on attacker-influenced data. A single genuinely-acyclic relation chain of roughly 1000-1500 nodes exhausts the Python call stack, raising an uncaught RecursionError that terminates the traversal or request worker. The reporter demonstrated this with a syntactically valid 1500-node linear hypernym-chain WordNet database loaded via the real WordNetCorpusReader; it is a described proof-of-concept, not verified as distributed working 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 recursion in NLTK's WordNet relation traversal can terminate a Python worker process by exhausting the call stack when the host application loads a custom or foreign WordNet-format lexical resource. Through version 3.10.3, Synset.tree() and its vestigial alias Synset.acyclic_tree() call the recursive acyclic_branches_depth_first()/acyclic_depth_first() helpers with the default depth=-1, so a genuinely acyclic chain of roughly 1000-1500 nodes raises an uncaught RecursionError; NLTK 3.10.4 adds a MAX_RECURSION_DEPTH=500 cap. NLTK's bundled WordNet 3.0 corpus tops out near depth 18 for hypernyms and 41 for also_sees, so default deployments are not exposed, and Synset.closure() is unaffected because it traverses iteratively. A public PoC reference exists in the vendor advisory; it is not verified as working exploit code, and no active exploitation is confirmed (not in CISA KEV).

RemediationAI

Upgrade to NLTK 3.10.4, which caps the acyclic traversal helpers behind Synset.tree() and Synset.acyclic_tree() at MAX_RECURSION_DEPTH=500 and raises a ValueError instead of exhausting the stack; the release is published at https://github.com/nltk/nltk/releases/tag/v3.10.4 and the underlying change is commit 0e474a7d73c95b42aa2c792f364e4f9bf4096c56, with the advisory at https://github.com/nltk/nltk/security/advisories/GHSA-8846-p9w9-5frf. If upgrading is not immediately possible, the highest-value control is to stop passing untrusted lexical data into NLTK's recursive traversal: restrict WordNetCorpusReader to trusted, curated resources, since that removes the documented custom-lexicon capability and will break domain-specific WordNet use cases. Where the custom lexicon must be retained, call Synset.closure() instead of .tree()/.acyclic_tree() - closure() uses the iterative acyclic_breadth_first() and is not affected - or pass an explicit finite depth argument to .tree(), noting that an explicit value overrides the default and therefore must be chosen by the application rather than derived from untrusted input. Because the failure is an uncaught RecursionError, running lexicon loading and traversal in an isolated worker process with resource limits keeps a crash from taking down the main service, at the cost of added latency and operational complexity. Merely raising Python's recursion limit is not a fix and only moves the crash point.

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 sits in nltk/util.py, where acyclic_depth_first() and acyclic_branches_depth_first() recurse once per graph edge and accept depth=-1 as 'unlimited'; an explicit traversed set prevents literal cycles but never bounds how many distinct nodes a single call chain passes through, which is the classic CWE-674 uncontrolled-recursion pattern. nltk/corpus/reader/wordnet.py routes Synset.tree(rel, depth=-1) through acyclic_branches_depth_first(), and Synset.acyclic_tree() is a class-attribute alias for the equally recursive acyclic_depth_first(); acyclic_dic2tree() shares the same helper. The advisory explicitly corrects an earlier assumption that Synset.closure() was affected: closure() calls acyclic_breadth_first(), an iterative queue/deque implementation that handled a 20,000-node chain without crashing, while the recursive helpers fail at ~1000-1500 nodes. This is the same recursion-hardening gap already closed elsewhere in the codebase (MAX_TREE_DEPTH in tree/tree.py, MAX_DEPTH in featstruct.py, MAX_PARSE_DEPTH in logic.py, MAX_TABLEAU_DEPTH in tableau.py, MAX_DECODE_DEPTH in jsontags.py) that never reached util.py or wordnet.py. The trigger is depth exhaustion of the Python call stack during relation traversal, producing RecursionError; the assessed vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H reflects availability-only impact (C:N/I:N/A:H) gated by the prerequisite of non-default, attacker-influenced lexical data. The upstream fix (commit 0e474a7d7) introduces MAX_RECURSION_DEPTH=500 and raises ValueError('...exceeds maximum allowed recursion depth') from the acyclic traversal helpers, and adds tests confirming that depth=-2 is rejected with 'depth must be >= -1' while a caller-supplied explicit depth still overrides the default cap.

Know when Python 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) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

AC:H because exploitation depends on the uncommon deployment-side condition of loading an attacker-influenced custom WordNet resource; no authentication on the sink so PR:N; only an availability crash, so C:N/I:N/A:H.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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 - 18:18 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, WordNet Synset.tree and acyclic_tree traverse relation graphs through recursive utility helpers without a depth bound. Exploitation requires the host application to load an attacker-influenced custom or foreign WordNet-format lexical resource; no relation in NLTK's bundled WordNet 3.0 corpus reaches the crash threshold. An excessively deep relation graph in such a resource can exceed the Python recursion limit and terminate the traversal or request 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.

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-129223 exposes a denial-of-service risk for applications that use the NLTK natural language toolkit (through version 3.10.3) and load custom or foreign WordNet-format lexical resources. If a maliciously crafted resource is loaded, traversal operations can exhaust the call stack and terminate the Python worker process, causing service disruption. Only teams using non-standard WordNet data are affected; bundled WordNet deployments are not at risk, so leadership should prioritize remediation for those specific use cases.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include avoiding the loading of custom or foreign WordNet-format resources, restricting resource loading to trusted sources, and upgrading to NLTK 3.10.4 or later when available.

Threat Intelligence Overview

EPSS Score
0.7%
Top 47% exploitable
Prevalence
High
NLTK is a very widely deployed Python NLP library across research and production
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL 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 Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

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