Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocate NLTK endpoint using user-supplied regex pattern
-
DeliverySubmit ~50KB many-empty-group pattern
-
ExploitPattern reaches regex-engine compile sink
-
ExecutionQuadratic compilation runs before match timeout
-
PersistOne request pins a CPU core
-
ImpactConcurrent requests exhaust all cores, deny service
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 | The application must pass caller/attacker-controlled text as the regular-expression PATTERN argument into one of the NLTK sinks: TokenSearcher.findall()/Text.findall() (3.10.0-3.10.3), RegexpTokenizer, or nltk.redos.compile (introduced 3.10.3). The crafted pattern is many empty capturing groups (e.g. '()' * N); it contains no whitespace, '<', '>', or '.', so it survives TokenSearcher.findall's preprocessing rewrites unchanged. Per PR:N/UI:N no authentication or user interaction is needed at the NLTK layer. Key limiting factors defenders can rely on: the untrusted input must be the pattern itself, not the searched corpus (uncommon in typical integrations); only versions 3.10.0 through 3.10.3 are affected; and NLTK's existing timeout is a match-time guard that does not apply, so the only complete fix is upgrading to 3.10.4. |
| Impact | CVSS 3.1 scores this 7.5 (HIGH) with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - availability-only impact, no confidentiality or integrity. The signals are internally consistent for a denial-of-service issue: network-reachable, low complexity, no privileges, no user interaction, A:H. The vuln.today priority is this_week, not act_now or emergency. No EPSS score was provided and the CVE is not in CISA KEV, so there is no evidence of active exploitation; a public proof-of-concept with timing measurements is published inside the GHSA-32p6-cwhc-8r78 advisory itself, but PoC availability is distinct from exploitation. The decisive real-world caveat the raw 7.5 hides: exploitation requires the integrating application to pass attacker-controlled text as the regular-expression PATTERN argument (not merely as the corpus being searched). Most NLTK integrations feed untrusted input as the text to be searched or tokenized, not as the pattern, so the exposed surface is far narrower than AV:N/PR:N implies. Net: a genuine unauthenticated DoS where the pattern sink is exposed, but a high-CVSS/low-real-exposure issue for the typical integration. Patch, but scope which deployments actually route untrusted input into the pattern argument. |
| Exploit ScenarioDerived | An application builds a search or tokenization feature on Text.findall()/TokenSearcher.findall() or a RegexpTokenizer whose pattern string is taken from user input. An unauthenticated attacker submits a tiny (~50 KB) pattern of many empty capturing groups such as '()' repeated 25000 times; the third-party regex engine spends tens of seconds compiling it before any matching begins, and NLTK's match-time wall-clock timeout never fires because it does not cover compilation. A working proof-of-concept with measurements is published in the GHSA advisory; repeated or concurrent requests exhaust all CPU cores and deny service. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
NLTK 3.10.0 through 3.10.3 can be driven into sustained CPU exhaustion by a remote unauthenticated attacker who controls the regular-expression pattern handed to TokenSearcher.findall/Text.findall, to RegexpTokenizer, or (from 3.10.3) to nltk.redos.compile. Because the adopted third-party regex engine compiles group-dense patterns at roughly quadratic cost - a ~50 KB string of repeated empty groups such as "()" * 25000 takes several seconds to tens of seconds - and NLTK's wall-clock timeout only governs matching, a single small request blocks a worker core and concurrent requests deny service (CVSS 3.1 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). A public proof-of-concept is documented in the GitHub advisory GHSA-32p6-cwhc-8r78; it is not confirmed as deployed exploit code, and no CISA KEV listing is present in the supplied data. The vendor fixed the issue in 3.10.4.
RemediationAI
Vendor-released patch: upgrade nltk to 3.10.4, the release that closes CVE-2026-129229, available from PyPI and tagged at https://github.com/nltk/nltk/releases/tag/v3.10.4 (fix committed in 002bcf714ef8cb8baf94436f4be73e5516914412 via https://github.com/nltk/nltk/pull/3895; advisory https://github.com/nltk/nltk/security/advisories/GHSA-32p6-cwhc-8r78). Every branch from 3.10.0 through 3.10.3 should move to 3.10.4, with 3.10.3 prioritised because its released nltk/redos.py has no pre-compile guard or length cap. The advisory is explicit that the existing match-time wall-clock timeout is not a mitigation - it provably does not fire during compilation - and that the development-tree pre-compile check does not bound group count, so upgrading is the only complete fix; no vendor-documented workaround is given. Defenders who cannot upgrade immediately must rely on the deployment-side limiting factor described in the advisory rather than on NLTK's timeout: ensure that no externally supplied string is used as the pattern argument to TokenSearcher.findall, Text.findall, RegexpTokenizer or nltk.redos.compile, hard-coding or allow-listing patterns instead, and restricting or rate-limiting any service endpoint that forwards user input into those sinks so a single request cannot pin a worker core for tens of seconds.
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 adopted the third-party regex engine for the caller-supplied-pattern search path in 3.10.0, as the remediation for an earlier match-time backtracking flaw (GHSA-rrv8-h7p8-rx55 / CVE-2026-80205). That fix wrapped corpus scanning in a wall-clock timeout, but pattern compilation happens first, synchronously, outside any timeout. The regex compiler's cost is approximately O(n^2) in the number of capturing groups, so a short attacker-supplied pattern composed of many empty groups makes compilation - not matching - the expensive step: regex.compile("()" * n) measured 0.35s / 1.17s / 2.61s / 4.77s for n = 5000 / 10000 / 15000 / 20000, while the standard library re compiled a same-length 20000-group pattern in 0.14s, isolating the cost to group count in the adopted engine. The flaw is CWE-400 (uncontrolled resource consumption), with the advisory also classifying it as CWE-1333 (inefficient regular expression complexity). On released 3.10.0-3.10.2 the sink calls regex.findall(pattern, corpus, timeout=...) directly; 3.10.3 added nltk/redos.py and routed RegexpTokenizer through nltk.redos.compile -> regex.compile(src, flags) with no pre-compile guard or length cap at all, making it the most exposed release. The development tree adds a check_pattern guard bounding source length, nesting depth and counted-repeat product, but it does not count groups (it accepts "()" * 49000), so the compile-time vector persists there. CPE coverage is nltk:nltk for versions from 3.10.0 up to and including 3.10.3; 3.9.4 and earlier used the standard library re at that sink and are not affected. Exploitation requires that untrusted text become the pattern itself rather than the corpus being searched, which the assessment flags as an uncommon integration pattern and a key limiting factor.
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:H
Network-reachable when the pattern sink is exposed, low complexity with a small crafted pattern, no privileges or interaction at the library layer, availability-only impact (CPU exhaustion), so C:N/I:N/A:H.
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. From 3.10.0 until 3.10.4, TokenSearcher.findall and Text.findall accept caller-controlled regular expressions with an unbounded number of capturing groups throughout the affected range. Starting in 3.10.3, nltk.redos.compile and RegexpTokenizer expose the same compile-time vector. The third-party regex engine compiles group-dense patterns with roughly quadratic cost before the match-time timeout begins, allowing a small unauthenticated request to exhaust CPU and deny service. This issue is fixed in version 3.10.4.
Blast Radius
ecosystem impact- 6 pypi packages depend on nltk (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Articles & Coverage 1
Technical POC Analysis
CWE-400 (Uncontrolled Resource Consumption), also tagged CWE-1333.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity vulnerability in NLTK versions 3.10.0 through 3.10.3 allows a remote, unauthenticated attacker to cause sustained CPU exhaustion by submitting malicious regular expressions, leading to denial of service. Since NLTK is a widely used Python library for natural language processing, any internet-facing service using these versions is at risk of becoming unresponsive, disrupting operations and potentially affecting customers and revenue. Leadership should prioritize patching to maintain service availability and protect organizational reputation.
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
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-130427
GHSA-32p6-cwhc-8r78
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB