Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted CCG lexicon to exposed parser
-
ExploitTrigger quadratic re-slicing in matchBrackets/augParseCategory
-
ImpactExhaust single-core CPU and starve worker threads
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 an application to call the public nltk.ccg.lexicon.fromstring (or nltk.ccg.chart.fromstring) on CCG lexicon text that the attacker can influence; the attacker must control the width of a single bracket body or the length of an operator chain, neither of which fromstring caps. No authentication or user interaction is required once that parsing path is exposed (CVSS PR:N/UI:N). The key LIMITING factor is deployment: only services that parse untrusted CCG lexicon strings are reachable - a niche usage of NLTK, not its common tokenization/corpus functionality - which sharply narrows real exposure. The existing MAX_PARSE_DEPTH=500 recursion guard and the regex wall-clock timeout do not protect this path, because the payloads are flat (nesting depth zero) and the slow loops are pure-Python slicing, not regex. |
| Impact | The CVSS 4.0 base score of 8.7 is driven entirely by availability impact (VA:H) on a network-reachable, unauthenticated, no-interaction path (AV:N/AC:L/AT:N/PR:N/UI:N); confidentiality and integrity are explicitly unaffected (VC:N/VI:N), so this is a pure CPU-exhaustion denial of service, not a code-execution or data-disclosure issue. No EPSS score and no CISA KEV entry are present in the input, so there is no public signal of active or at-scale exploitation; the GHSA advisory does, however, contain a detailed, measured proof-of-concept demonstrating the quadratic blow-up (vector A shows a clean ~4x cost per input doubling), so the mechanism is well understood and reproducible. The vuln.today priority decision label is 'this_week' - elevated but short of act_now/emergency - which is consistent with a high-severity but availability-only flaw that lacks confirmed in-the-wild use. The most important caveat is that the headline AV:N/PR:N metrics describe the library function in isolation: real-world exploitability depends on whether a given application actually feeds attacker-controlled text into nltk.ccg.lexicon.fromstring, which is an uncommon integration, so the practical attack surface is far narrower than the network-vector metrics alone suggest. Signals are broadly consistent (no conflict between CVSS, decision label, and the absence of KEV/EPSS); the main open question is deployment exposure of the specific CCG parsing path rather than any disagreement in the threat data. |
| Exploit ScenarioDerived | An application that accepts user-supplied grammar or lexicon text and passes it to nltk.ccg.lexicon.fromstring (or the re-export nltk.ccg.chart.fromstring) receives a few-megabyte payload containing one very wide flat bracket body or a long '/a/a/a...' operator chain. The quadratic string re-slicing in matchBrackets and augParseCategory consumes tens of seconds of single-threaded CPU per request, and a handful of concurrent requests exhausts the worker threads, degrading or halting the service. The advisory includes a working, measured proof-of-concept, but no CISA KEV listing or active exploitation is reported. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.fromstring) allows remote, unauthenticated attackers to burn tens of seconds of single-threaded CPU per request by supplying lexicon text with a very wide flat bracket body or a very long operator chain, starving worker threads. All releases up to and including 3.10.3 are affected; the fix ships in NLTK 3.10.4. Availability-only impact (C:N/I:N/A:H) on a network-reachable, no-interaction path, and exploitation is confined to services that actually parse untrusted CCG lexicon strings - a niche use of the library - so real-world exposure is narrow despite the 8.7 severity. The vendor advisory includes a working proof-of-concept with measured quadratic scaling; there is no confirmed active exploitation (not in CISA KEV) and no EPSS score was provided.
RemediationAI
Vendor-released patch: upgrade NLTK to 3.10.4 (pip install --upgrade 'nltk>=3.10.4'), which per the advisory threads a cursor through matchBrackets, nextCategory and augParseCategory to make each character constant-amortized work and adds a MAX_PARSE_LEN=100000 bound that rejects oversized input (upstream fix commit cf12a5e6a, tracked in GHSA-89p3-fcch-88ph). Note that during the advisory's lifetime the fix was still on an open, not-yet-merged pull request and no release had shipped at the time of that note, so confirm the 3.10.4 artifact on PyPI before relying on the version bump. If upgrading is not immediately possible, the advisory states that no configuration-only mitigation fully removes exposure for a service that must parse untrusted lexicons; instead, callers should cap the size of accepted lexicon input before it reaches fromstring and parse it under a CPU or time budget in an isolated worker - the trade-off being that legitimate large lexicons will be rejected or truncated and that worker isolation adds latency and infrastructure cost. Blocking/validating the lexicon-supply endpoint at the network edge, or refusing untrusted CCG lexicons entirely, removes the vector at the cost of disabling that feature; the existing MAX_PARSE_DEPTH recursion guard and the NLTK regex wall-clock timeout are not viable workarounds because flat payloads bypass both.
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
The flaw is CWE-400 (uncontrolled resource consumption) with the advisory also tagging CWE-407 (inefficient algorithmic complexity). In nltk/ccg/lexicon.py, matchBrackets walks a bracket body one character at a time using 'inside = inside + rest[0]; rest = rest[1:]', and the unconditional tail re-slice copies the whole remaining string on every iteration, making a flat bracket body O(n^2). Separately, augParseCategory runs a 'while rest != "":' operator loop that re-copies the regex match tail ('rest = app[3]') once per operator, which is likewise quadratic over a long operator chain. The parser's only relevant guard is the MAX_PARSE_DEPTH = 500 recursion-depth check; because these payloads are flat (nesting depth zero to one) it never fires, and the regex wall-clock timeout only wraps regex matching, not these pure-Python slicing loops. The advisory notes no line-length or category-width cap exists anywhere on the fromstring path, and CPython's in-place string concatenation fast path cannot elide the explicit 'rest = rest[1:]' copy, which the measured ~4x cost per input doubling confirms empirically. The upstream fix threads an index cursor through matchBrackets, nextCategory and augParseCategory instead of re-slicing the tail. Trigger requirements are deployment-dependent: exposure exists only where an application passes caller-influenced CCG lexicon text to fromstring; NLTK's common tokenization and corpus functionality does not reach this code path.
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
Unauthenticated, low-complexity network input to the parser causes quadratic CPU exhaustion; availability-only (A:H), with no confidentiality or integrity impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK before 3.10.4 contains a denial of service vulnerability in the CCG lexicon parser fromstring that allows remote attackers to exhaust CPU by supplying wide inputs. Attackers can submit lexicon text with long flat bracket bodies or operator chains, triggering quadratic string re-slicing in matchBrackets and augParseCategory that blocks worker threads.
Articles & Coverage 1
Technical POC Analysis
CWE-400 (Uncontrolled Resource Consumption; the advisory also tags CWE-407, inefficient algorithmic complexity).
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 flaw in the NLTK library's CCG lexicon parser (CVE-2026-126299) enables unauthenticated attackers to exhaust CPU resources by submitting specially crafted input, potentially disrupting any service that relies on this parser. However, exposure is limited to systems that directly process untrusted CCG lexicon data, a narrow use case, so most organizations are not at risk. Leadership should prioritize patching affected systems and confirming whether this functionality is in use.
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
CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot
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-125222
GHSA-89p3-fcch-88ph
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB