Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit long double-quote run to span-tokenizing endpoint
-
ExploitPayload reaches quote-restore branch unchanged
-
ExecutionTrigger O(n²) matched.pop(0) loop
-
ImpactSaturate one CPU core, degrade availability
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that a network-reachable component pass attacker-controlled untrusted text to TreebankWordTokenizer.span_tokenize (exported from nltk.tokenize) - typical in offset, annotation, or highlighting pipelines. The payload must contain a long run of double-quote characters to enter the quote-restoration branch (branch selector matches '"' in text), which NLTK versions 3.2.5 through before 3.10.4 process with an unguarded O(n^2) list.pop(0) loop and no input-length cap. No authentication, special configuration, or user interaction is required (CVSS PR:N/UI:N/AC:L). Limiting factors: the vulnerable API must actually be exposed to attacker-supplied text (not all NLTK deployments span-tokenize untrusted input); impact is bounded to single-core CPU exhaustion and latency/availability degradation rather than code execution or data loss; and worker-pool exhaustion under concurrency is inferred from measured per-request cost, not demonstrated against a live service. |
| Impact | This is a genuine but moderate-severity availability issue, not a high-urgency emergency. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms network-reachable, low-complexity, unauthenticated triggering with no user interaction, but the only impact metric set is VA:L (low availability) - VC:N and VI:N mean no confidentiality or integrity exposure. The scored 6.9 reflects easy reach combined with limited (single-CPU-core) impact rather than a system-wide outage. Exploitation status is best characterized as a public PoC reference existing (the GHSA advisory embeds runnable reproduction code with measured timings), but the input does not mark the PoC as 'Publicly available (confirmed)' as weaponized tooling, and there is no CISA KEV listing and no EPSS score supplied, so there is no evidence of active or widespread exploitation. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a real-but-patchable DoS. The main signal tension is the patch state: top-level metadata and EUVD report a fix available in 3.10.4, while the embedded GitHub source snapshot dated 2026-09-28 states the fix was still on open pull requests and not yet released ('Fix status: not fixed'); given today's date (2026-11-13) the release likely shipped, but this should be verified against PyPI. Bottom line: prioritize patching for any service that span-tokenizes untrusted text, but this is a resource-exhaustion DoS of bounded blast radius, not a critical RCE. |
| Exploit ScenarioDerived | An attacker submits a long run of double-quote characters (e.g. '"' * 256000) to any network-reachable service that calls TreebankWordTokenizer.span_tokenize on attacker-supplied text - such as an offset, annotation, or highlighting pipeline. Because of the O(n^2) matched.pop(0) loop, a single such request saturates one CPU core (about 6.57 seconds for 256,000 characters, growing quadratically), and concurrent requests can exhaust a worker pool and degrade availability. A runnable proof-of-concept with timing measurements is included in the GHSA advisory, though the input does not mark it as a confirmed weaponized exploit; no authentication, special configuration, or user interaction is required (PR:N/UI:N). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Quadratic CPU consumption in NLTK's TreebankWordTokenizer.span_tokenize affects versions 3.2.5 through 3.10.3 and can let unauthenticated remote attackers tie up a CPU core by submitting long runs of double quotes to services that span-tokenize untrusted text. A public proof-of-concept reference exists, and the vendor has released 3.10.4; impact is limited to availability degradation rather than code execution or data compromise. No KEV listing or EPSS score was supplied.
RemediationAI
Vendor-released patch: upgrade to nltk 3.10.4 or later; the fix replaces the O(n) list.pop(0) consumption pattern with forward iteration in tokenize/treebank.py and tokenize/destructive.py, per the GHSA advisory at https://github.com/nltk/nltk/security/advisories/GHSA-ffr9-mgrr-wcvr. If immediate upgrade is not possible, cap request and input lengths at the application boundary before calling span_tokenize and avoid exposing span_tokenize to untrusted text; these are interim mitigations and do not remove the quadratic behavior for accepted inputs. The VulnCheck advisory is available at https://www.vulncheck.com/advisories/nltk-from-3.2.5-before-3.10.4-cpu-exhaustion-via-treebankwordtokenizer-span-tokenize.
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 TreebankWordTokenizer is a pure-Python tokenizer exported from nltk.tokenize. In the quote-restoration branch, span_tokenize builds a matched list with one entry per double-quote occurrence and then reconstructs quote tokens using matched.pop(0); because removing the first element of a Python list is O(n), an input of n quotes yields cumulative O(n^2) work. The flaw is an algorithmic complexity issue (CWE-407; the advisory also maps CWE-400) with no input-length cap in span_tokenize or the underlying tokenize, and the project's regex timeout backstop in nltk/redos.py does not cover the pure-Python pop(0) sink. The trigger is specifically a long run of double-quote characters that satisfies the branch selector, and the demonstrated effect is single-core CPU exhaustion and latency degradation, with worker-pool exhaustion under concurrency inferred rather than demonstrated against a live 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Remote, low-complexity, unauthenticated triggering with no user interaction; impact is limited single-core CPU exhaustion, so A:L and C:N/I:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit long runs of double-quote characters to services span-tokenizing untrusted text, exhausting a CPU core and degrading availability.
Blast Radius
ecosystem impact- 16 pypi packages depend on nltk (16 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.2.5.
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
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-125221
GHSA-ffr9-mgrr-wcvr
NVD
CVE.org
EPSS
VulDB
Exploit-DB