Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft Toolbox settings file nested thousands deep
-
DeliverySubmit to app that parses untrusted input
-
ExploitApplication invokes recursive helper (e.g. to_settings_string)
-
ExecutionHelper recurses past interpreter recursion limit
-
ImpactUnhandled RecursionError aborts worker (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Two concrete prerequisites must both hold: (1) the application parses an attacker-supplied/untrusted Toolbox settings file via ToolboxSettings.open_string/open plus parse, and (2) it subsequently passes the resulting tree to one of the five public helpers - to_settings_string, remove_blanks, add_default_fields, sort_fields, or add_blank_lines (the module's own parse-then-serialise round trip triggers this). The attacker must supply input nested beyond the interpreter recursion limit via many \+marker/\-marker pairs (clean at 5 levels, failure demonstrated at ~5000 levels); the config-taking helpers fail even with empty configuration dictionaries. Limiting factors that reduce real-world risk: the vulnerable Toolbox-settings code path is a niche feature rarely exposed to untrusted input, so despite the network vector the realistic attack surface is narrow; the result is a catchable RecursionError (availability only) affected versions <= 3.10.3, fixed in 3.10.4. |
| Impact | Signals point to a genuine but moderate-priority availability issue, not a top-tier emergency. The CVSS 3.1 base vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, 5.3) shows a network-reachable, unauthenticated, no-interaction flaw whose only impact is a low availability hit - confidentiality and integrity are explicitly unaffected per the GHSA advisory. CWE-674 (uncontrolled recursion) produces a catchable Python RecursionError, so the worst case is a crashed operation or request worker, not code execution or memory corruption. No CISA KEV listing is present (not actively exploited per available data), and no EPSS score was provided, so exploitation probability cannot be quantified from the input. A repository security probe (ghsa_f2h2_f4fc_p978.py) reproduces the condition, but there is no indication of weaponized public exploit code. The vuln.today decision label is 'this_month', consistent with routine patching rather than act_now/emergency. Important caveat: the AV:N network vector overstates real-world reach - exploitation is only possible in applications that actually parse untrusted Toolbox settings files AND then call one of the five recursive helpers, a narrow and uncommon code path within an otherwise very popular library. Net: a real issue to patch on a normal cadence, not a high-urgency widespread threat. |
| Exploit ScenarioDerived | An attacker submits a Toolbox settings file containing thousands of nested \+marker/\-marker pairs (demonstrated at ~5000 levels deep) to an application that parses untrusted input via ToolboxSettings and then serialises or transforms it through a public helper such as to_settings_string. The iterative parse succeeds, but the recursive helper exhausts the interpreter's call-stack limit and raises an unhandled RecursionError, aborting the request worker (denial of service). A public PoC reference exists as the project's own security probe; it is not verified as weaponized exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Denial of service in NLTK (Natural Language Toolkit) through 3.10.3 lets unauthenticated remote attackers abort an operation or request worker by supplying a Toolbox settings file nested deeper than the Python interpreter recursion limit. The producer, ToolboxSettings.parse, builds the settings tree iteratively and completes cleanly, but the public helpers to_settings_string, remove_blanks, add_default_fields, sort_fields and add_blank_lines each recurse once per element level with no depth bound, so a downstream parse-then-serialise round trip raises an unhandled RecursionError; the config-taking helpers fail even with empty configuration dictionaries. Impact is availability only (CVSS 5.3, AV:N/AC:L/PR:N/UI:N/C:N/I:N/A:L) and the realistic attack surface is narrow because the Toolbox settings code path is rarely fed untrusted input; no CISA KEV entry exists, and a public reproducer exists in the upstream security probe test (documented at roughly 5000 nesting levels) rather than as standalone remote exploit code. Fixed in 3.10.4.
RemediationAI
Upgrade to NLTK 3.10.4 (pip install -U 'nltk>=3.10.4') and confirm the installed version, since the advisory's fix-status note records that the correcting merge commit e521ecafc on PR #3885 initially landed on develop with no release tag containing it at that time, while the release tag v3.10.4 and package metadata list 3.10.4 as fixed - verify the deployed distribution rather than assuming. Because the fix enforces MAX_TOOLBOX_DEPTH=500 at parse time and now raises ValueError, callers must handle ValueError from ToolboxSettings.parse/open_string and from the helper functions where they previously assumed parsing always succeeded. If upgrading is not immediately possible, do not pass untrusted or attacker-supplied Toolbox settings files through the parse-then-serialise round trip: restrict upload/ingest paths that accept Toolbox settings to trusted sources, or pre-validate nesting depth (reject inputs with more than a few hundred \+marker / \-marker levels) before invoking any of the five helpers - trade-off: depth pre-checks must be applied consistently at every call site, and an unpatched library still fails on any path that is missed. Running the parsing and serialisation work in an isolated worker that can be restarted limits the blast radius of a RecursionError to a single job, at the cost of added infrastructure and partial loss of in-flight state; catching RecursionError around the helper calls is only a partial control, since the failure occurs after deep recursion has consumed stack and the operation must still be abandoned. Applicable fixes and version guidance are documented at https://github.com/nltk/nltk/security/advisories/GHSA-f2h2-f4fc-p978, https://github.com/nltk/nltk/pull/3885 and https://github.com/nltk/nltk/releases/tag/v3.10.4.
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 NLP library; the affected component is nltk/toolbox.py, which parses Toolbox settings files where nesting is expressed through attacker-supplied \+marker / \-marker pairs. CWE-674 (uncontrolled recursion) is the root cause: the design deliberately made parsing iterative, so a 4999-deep tree is constructed without error, while the traversal side (_to_settings_string at toolbox.py:418, remove_blanks at :432, add_default_fields at :451, _sort_fields at :484, add_blank_lines at :502 and :516) uses pure-Python recursion with no depth counter or explicit stack. Because the recursion is pure Python, the failure is a catchable RecursionError - no memory corruption, code execution, confidentiality or integrity impact - but when it propagates uncaught out of the public API it terminates the calling operation or request worker. Verification in the upstream advisory shows a 5-level input traversing every helper cleanly and a 5000-level input driving all five helpers to RecursionError, confirming the fault is isolated to the recursive helpers and not the parser. The upstream fix (PR #3885, commit 0b6975377) caps traversal at MAX_TOOLBOX_DEPTH=500 and raises ValueError instead of letting the interpreter's stack limit be reached; the same PR additionally bounded recursion in the CCG lexicon parser (MAX_PARSE_DEPTH) and in the BNC and SemCor XML corpus readers (MAX_XML_DEPTH), which are separate uncontrolled-recursion surfaces in the same module family. Note that the advisory tags mention 'Information Disclosure', which does not match the actual assessed impact of availability-only denial of service.
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-supplied Toolbox file is processed network-reachably with no auth or interaction (AV:N/AC:L/PR:N/UI:N); only availability is affected (A:L) via a catchable RecursionError, so 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. Prior to 3.10.4, ToolboxSettings.parse builds a deeply nested attacker-controlled settings tree iteratively, but the later public helpers to_settings_string, remove_blanks, add_default_fields, sort_fields, and add_blank_lines recursively traverse that tree without a depth bound. Invoking any of those helpers on input nested beyond the interpreter recursion limit can raise RecursionError and abort the operation or request 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-130496
GHSA-f2h2-f4fc-p978
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB