Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with separator-heavy crafted text
-
DeliveryPass input to TweetTokenizer.tokenize()
-
ExploitTrigger exponential backtracking in URLS naked-domain regex branch
-
ExecutionMonopolize Python GIL-bound process thread for seconds to minutes
-
ImpactDeny service to all concurrent requests on that worker
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity 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 service passes externally supplied text through TweetTokenizer.tokenize() or casual_tokenize() - precisely the use case the component is designed and documented for. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms no authentication, no special network position, and no user interaction are required. No non-default NLTK configuration is necessary; the URLS regex is compiled at module import time and is active in all default TweetTokenizer instantiations. The primary limiting factor is input shape: the malicious string must consist of many alternating period and hyphen characters without a valid TLD suffix, meaning normal social-media content is unlikely to trigger this accidentally. Services that truncate or validate input length before tokenization, or that do not expose tokenization to external callers at all, are not directly exploitable. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, score 8.7) accurately represents the real-world risk: no authentication, no special preconditions, and high availability impact reachable over the network. Python's GIL means a single malicious request can monopolize an entire worker process for seconds to minutes, blocking all concurrent requests queued to that process. No public exploit code is cited in the provided intelligence and the vulnerability is absent from CISA KEV, but the attack pattern is trivially reproducible from the public description and the VulnCheck advisory - exploitation barrier is effectively knowledge-only once the advisory is public. EPSS data was not included in the provided intelligence sources, so exploitation probability cannot be quantified from this dataset. The impact is scoped strictly to availability; confidentiality and integrity are unaffected, which moderates the overall business risk despite the high base score. Organizations running any user-facing NLP or social-media processing pipeline on NLTK below 3.10.1 should treat this as a priority upgrade given the zero-prerequisite exploitation path. |
| Exploit ScenarioDerived | An attacker sends an HTTP POST to a sentiment-analysis or content-moderation API that internally calls TweetTokenizer.tokenize() on user-supplied text, with a payload of a few kilobytes of strings such as 'a.b-c.d-e.f-g.h-...' - many alternating period and hyphen characters with no valid TLD. The Python regex engine enters catastrophic backtracking on the naked-domain branch of WORD_RE, consuming the worker process thread for seconds to minutes and blocking all concurrent requests. No authentication, tooling, or prior access is required, and the attack can be scripted to sustain continuous denial of service. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Catastrophic regex backtracking in NLTK's TweetTokenizer (all versions before 3.10.1) allows unauthenticated remote attackers to stall Python service processes by submitting a few kilobytes of crafted text containing alternating domain label separators. Because TweetTokenizer is explicitly designed to process untrusted social-media input, every public-facing API or pipeline that passes user text through TweetTokenizer.tokenize() or casual_tokenize() is directly exposed to per-request denial of service with no authentication required. No public exploit has been identified at time of analysis and the vulnerability is not in CISA KEV; the fix is confirmed available in NLTK 3.10.1.
RemediationAI
Upgrade NLTK to version 3.10.1 or later, which bounds the label repetition in the URLS regex to eliminate the catastrophic backtracking path; the patched release is available at https://github.com/nltk/nltk/releases/tag/v3.10.1 and installable via pip install --upgrade nltk. If an immediate upgrade is not feasible, add an explicit input length cap before calling TweetTokenizer.tokenize() or casual_tokenize() - rejecting inputs exceeding approximately 1-2 KB prevents the crafted separator pattern from accumulating sufficient alternations to trigger exponential backtracking, at the trade-off that unusually long but legitimate posts would be silently dropped or truncated. API-layer rate limiting on tokenization endpoints reduces the risk of sustained flooding but does not prevent individual per-request stalls lasting seconds to minutes. Do not rely on the existing HANG_RE substitution as a compensating control; the CVE description explicitly confirms it does not address this pattern.
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 vulnerability resides in the URLS regular expression within nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and evaluated on every call to TweetTokenizer.tokenize(). The naked-domain branch uses the label-prefix sub-pattern [a-z0-9]+(?:[.\-][a-z0-9]+)*, which carries no upper bound on the number of repetitions. This is a canonical ReDoS condition (CWE-1333: Improper Neutralization of Input During Regular Expression Matching): strings of many alternating period and hyphen characters can be partitioned in an exponentially large number of ways, forcing Python's NFA-based regex engine to explore all those partitions before failing at each input offset. Because the branch additionally requires a trailing TLD segment that the crafted input never supplies, the engine cannot short-circuit; it must exhaust every partition before advancing. The existing HANG_RE pre-substitution step - applied before matching - does not collapse or neutralize this branch. The EUVD-confirmed affected range is nltk 0 through less than 3.10.1, with the fix introduced in v3.10.1 by bounding the label repetition count.
Know when the next one hits your stack
- 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, no authentication or special conditions required; availability impact is high (process stall per request) with no confidentiality or integrity impact and no scope change.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
2DescriptionCVE.org
The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.
Executive ViewAI
NLTK TweetTokenizer (versions before 3.10.1) contains a regex backtracking vulnerability that allows unauthenticated remote attackers to trigger denial of service by submitting kilobytes of crafted text. This affects all Python-based APIs and pipelines processing user-submitted social media content, creating an availability risk for customer-facing services with no authentication barrier to exploitation.
Apply vendor patch: NLTK 3.10.1
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.
EUVD-2026-63729
GHSA-qx2g-xrx7-vfh8
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB