Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach endpoint parsing untrusted treebank input
-
DeliveryCraft wide flat tree string
-
ExploitSubmit through Tree.fromstring parser
-
ExecutionTrigger O(N^2) pop(0) right-factor binarization
-
ImpactExhaust single-core CPU, block processing thread
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application (1) accept attacker-influenced treebank text, (2) parse it with the public nltk.tree.Tree.fromstring (which enforces no child-count cap), and (3) call Tree.chomsky_normal_form() with the default factor='right'. The quadratic cost comes specifically from the right-factor branch's 'curNode[0:] = [nodeCopy.pop(0), newNode]' front-shift; the left-factor branch uses pop() and is linear, so applications that pass factor='left' are not affected. LIMITING FACTORS: this is not a flaw in default library import - it only triggers when an application deliberately exposes CNF normalization of untrusted trees; impact is availability only (CPU/thread exhaustion), with no code execution, data access, or integrity loss. NLTK's regex wall-clock timeout does not wrap this pure-Python loop, so it provides no protection. There is no configuration-only mitigation for a service that normalizes untrusted trees; the vendor recommends upgrading, and until a release ships, capping accepted tree width and running the transform under a CPU/time budget in an isolated worker. |
| Impact | This is a genuine but bounded availability issue, not a critical system-compromise flaw. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scores 8.7 because the impact subscore is driven entirely by VA:H (high availability impact) with VC:N/VI:N - there is no confidentiality or integrity exposure, only single-threaded CPU exhaustion. The GHSA advisory confirms the mechanism concretely: right-factor binarization in Tree.chomsky_normal_form uses list.pop(0) in a loop, producing O(N^2) behavior, with measured timings (e.g. ~14.5s for N=320000, scaling quadratically). Signals mostly agree on moderate priority: vuln.today Decision label is 'this_week' (not act_now/emergency), it is NOT in CISA KEV, and no EPSS score is provided in the input so widespread-exploitation probability cannot be quantified. A working proof-of-concept is published in the GHSA advisory itself, which lowers the barrier to reproduction, but a PoC is not active exploitation. The practical limiter is architectural rather than reflected in the CVSS vector: despite AV:N/PR:N, exploitation requires that the target application actually feed attacker-influenced trees through Tree.fromstring and then call chomsky_normal_form() - most NLTK deployments never expose this path, so real-world reachability is narrower than the network-unauthenticated vector implies. Treat as a prompt-but-not-emergency patch/mitigation item for services that normalize untrusted parse trees. |
| Exploit ScenarioDerived | An application exposes a pipeline that accepts a treebank string from an untrusted client, parses it with Tree.fromstring, and converts it to Chomsky Normal Form. A remote attacker submits a single wide flat tree such as '(S (A a)(A a)...(A a))' with a very large child count, forcing the O(N^2) right-factor binarization to consume tens of seconds of CPU on one core and block the processing thread. A reproducing proof-of-concept with timing measurements is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remote, unauthenticated attackers who can supply treebank text block a processing thread for tens of seconds by forcing quadratic single-threaded work. The flaw is availability-only and requires an application to parse attacker-influenced text with Tree.fromstring() and normalize it to Chomsky Normal Form with the default factor='right'; confidentiality and integrity are unaffected, and applications using factor='left' are not affected. A proof-of-concept timing script is published in the GitHub advisory, and the input contains no CISA KEV confirmation of active exploitation.
RemediationAI
Upgrade NLTK to 3.10.4, the designated fixed release listed by the advisory and package metadata; the upstream correction was merged on develop in PR #3909 (commits 457ebe349 for linear front consumption and 677857dca for a MAX_TREE_DEPTH guard), with follow-up PR #3917. Until upgrading, do not pass untrusted treebank strings to Tree.chomsky_normal_form() with the default right factor: if the application's output permits it, call chomsky_normal_form(factor='left'), which uses the linear pop() branch; otherwise cap accepted tree width before normalization and run the transform under a CPU or wall-clock budget in an isolated worker so one wide tree cannot block the main processing thread. These are compensating controls only, and there is no configuration-only mitigation that preserves normalization of untrusted trees; the complete fix is the upgrade. Advisories: https://github.com/nltk/nltk/security/advisories/GHSA-r53h-rw34-8h97 and https://www.vulncheck.com/advisories/nltk-before-3.10.4-quadratic-cpu-denial-of-service-via-tree-chomsky-normal-form.
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 natural-language processing library whose Tree.chomsky_normal_form() converts a parse tree to Chomsky Normal Form by binarizing nodes. In the default right-factor branch, nltk/tree/transforms.py repeatedly executes curNode[0:] = [nodeCopy.pop(0), newNode]; list.pop(0) is O(N) because every remaining element shifts down, so binarizing one node with N children costs O(N^2). The left-factor branch uses nodeCopy.pop() to remove the last element in O(1) and is linear, so only the default right-factor path is quadratic. Tree.fromstring accepts arbitrarily wide bracketed trees and imposes no child-count cap, and NLTK's regex wall-clock timeout covers only regex matching, not this pure-Python list loop. This is CWE-400 uncontrolled resource consumption, with CWE-407 inefficient algorithmic complexity as an additional classification; import of NLTK alone does not trigger it, and the trigger is specifically application-level normalization of an attacker-influenced wide flat tree.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Network-reachable with no privileges or interaction and attacker-controlled width gives AV:N/AC:L/PR:N/UI:N; impact is CPU-exhaustion availability loss only, so C:N/I:N/A:H, scope unchanged.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK before 3.10.4 contains a denial of service vulnerability in Tree.chomsky_normal_form that allows remote attackers to exhaust CPU through quadratic-time right-factor binarization using list.pop(0). Attackers can supply a wide flat treebank tree parsed by Tree.fromstring to force tens of seconds of single-threaded CPU consumption, blocking the processing thread.
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.
Technical POC Analysis
NLTK's Tree.chomskynormalform() defaults to factor="right" (nltk/tree/tree.py:455) and delegates to nltk.tree.transforms.chomskynormalform (nltk/tree/transforms.py).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A high-severity denial-of-service vulnerability in NLTK, a widely used natural language processing library, can allow remote unauthenticated attackers to exhaust CPU resources by submitting maliciously crafted text that triggers quadratic processing time. Organizations using NLTK to parse untrusted text are at risk of processing delays and potential service unavailability, impacting business continuity and customer-facing applications.
Apply vendor patch.
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
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
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
Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service
EUVD-2026-125223
GHSA-6665-2vj3-h76r
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB