Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit deeply nested JSON to app endpoint
-
ExploitApp decodes and calls Tree.fromlist on list
-
ExecutionUnbounded per-level recursion exhausts call stack
-
ImpactUnhandled RecursionError terminates request worker
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires the application to pass an attacker-controlled nested list into nltk.tree.Tree.fromlist - the canonical pattern being Tree.fromlist(json.loads(untrusted_payload)) - or any later recursive traversal (height, pformat, equality) of an over-deep Tree. This is NOT reachable in default library usage; it depends on the application wiring untrusted input into the fromlist path. The attacker must supply nesting beyond the interpreter recursion limit (vendor evidence shows a reliable window from roughly depth 500 to ~1500 where json.loads still succeeds but fromlist raises). Limiting factors: impact is confined to aborting the current parse operation or request worker via a catchable RecursionError (no memory corruption, code execution, or data exposure), and confidentiality and integrity are unaffected. |
| Impact | This is a genuine but low-urgency availability issue, not a high-CVSS-but-overstated risk - the CVSS of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) correctly caps impact at availability only, with C:N/I:N confirming no data exposure or integrity loss. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a denial-of-service that terminates a single parse operation or request worker via a catchable Python RecursionError rather than causing memory corruption or code execution (the GHSA explicitly states the recursion is pure Python). No CISA KEV listing and no EPSS score were provided in the input, so there is no signal of active or probable widespread exploitation; absence of these is not evidence of safety but does lower priority. A vendor-authored security probe and detailed bypass evidence exist (depth ~500-5000 reliably raises RecursionError within a window where json.loads still succeeds), demonstrating the flaw is real and reliably triggerable, but this is a maintainer test artifact rather than a weaponized exploit. The PR:N in the vector reflects no authentication intrinsic to the function, but realistic exploitation depends on the application exposing Tree.fromlist to untrusted input, which is application-specific - so raw CVSS network-unauthenticated framing overstates reach relative to the narrow real-world trigger condition. |
| Exploit ScenarioDerived | An application decodes an untrusted JSON payload and passes the resulting nested list into nltk.tree.Tree.fromlist (e.g. Tree.fromlist(json.loads(untrusted))). Because fromlist recurses once per nesting level with no depth bound, an adversarially deep list exhausts the Python call stack and raises an unhandled RecursionError, aborting the current operation or crashing the request worker. A vendor security probe exists demonstrating the crash at depth ~5000; it is a maintainer test artifact, not verified as a weaponized working exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
NLTK's Tree.fromlist, the nested-list constructor in nltk.tree, recurses once per nesting level with no depth bound, so an attacker-supplied deeply nested list crashes the current parse operation or request worker with a catchable RecursionError. Only applications that wire untrusted input into Tree.fromlist (typically Tree.fromlist(json.loads(untrusted))) or later walk an over-deep Tree via height, pformat, or equality are affected; versions up to and including 3.10.3 are vulnerable, and the vendor's sibling parser Tree.fromstring already enforced a MAX_TREE_DEPTH of 500 on the string path while the list path remained uncapped. The CVSS of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) correctly caps impact at availability only, no public exploit has been identified at time of analysis, and 3.10.4 bounds fromlist with the same MAX_TREE_DEPTH ValueError.
RemediationAI
Vendor-released patch: 3.10.4 - upgrade with pip install --upgrade nltk and confirm the installed version is at least 3.10.4, which contains commit ae4c5c900 (PR #3885) where Tree.fromlist takes a max_depth argument defaulting to MAX_TREE_DEPTH and raises a bounded ValueError once nesting exceeds it; the release tag is at https://github.com/nltk/nltk/releases/tag/v3.10.4 and the advisory at https://github.com/nltk/nltk/security/advisories/GHSA-63wh-5r5m-wxr7. Until the upgrade lands, applications that accept untrusted nested lists should enforce their own depth check on the decoded JSON before calling Tree.fromlist or reachability-block that path entirely, and should wrap fromlist invocations in try/except RecursionError at a request boundary to convert the crash into a rejected input (trade-off: catching RecursionError only works if the handler itself does not need deep stack, and it does not repair the pre-existing MAX_TREE_DEPTH inconsistency that the 3.10.4 change fixes). Switching untrusted input to the string path (Tree.fromstring) is a partial compensating control because that constructor already enforces MAX_TREE_DEPTH=500, but it requires the input to be a parseable bracketed string and changes parsing semantics. Disabling or gating any endpoint that forwards decoded JSON into Tree.fromlist is effective and low-risk if that functionality is not business-critical. Raising sys.setrecursionlimit is not a remediation: it merely moves the crash threshold and increases the risk of an interpreter-level stack fault, whereas the patched code fails fast with a ValueError. Note that on the pre-3.10.4 code the MAX_TREE_DEPTH constant has no effect on the fromlist path, so adjusting it is not a workaround.
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's Tree is a recursive tree data structure whose constructors build nested nodes, and Tree.fromlist walked a Python list, recursing per level with the only validation being that each element is a non-empty list. The sibling constructor Tree.fromstring had already been hardened with a module-level MAX_TREE_DEPTH = 500 (nltk/tree/tree.py) that rejects adversarially deep input with a bounded ValueError, but that guard was never applied to the list-construction path even though both build Tree objects identically. The root cause class is CWE-674 (Uncontrolled Recursion): the recursion is pure Python, so exhaustion yields a catchable RecursionError rather than memory corruption or code execution, and any later recursive traversal (height, pformat, equality) of an over-deep tree fails the same way. The realistic JSON delivery objection was tested and rejected - CPython's C JSON decoder tolerates much deeper nesting than pure-Python fromlist, giving a measured window from roughly depth 500 up to about 1500 at the default recursion limit where json.loads succeeds and fromlist is the component that raises, with the crash threshold coinciding with the project's own MAX_TREE_DEPTH value of 500. The applied tag list mentions information disclosure, but neither the upstream advisory nor the assessed vector supports data exposure - C:N/I:N confirms the impact is availability-only.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Availability-only DoS (A:L) from a catchable RecursionError; AC:L and PR:N/UI:N because once an app exposes fromlist to input, sending a deep list is trivial and needs no auth.
Primary rating from Vendor (github).
CVSS VectorVendor: github
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, Tree.fromlist recursively converts nested Python list input into Tree objects without enforcing a maximum tree depth. An attacker-controlled list nested beyond the interpreter recursion limit can raise RecursionError and terminate the current parse 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
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-130435
GHSA-63wh-5r5m-wxr7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB