Skip to main content

NLTK TweetTokenizer CVE-2026-72818

| EUVDEUVD-2026-63729 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-08-20 disclosure@vulncheck.com GHSA-qx2g-xrx7-vfh8
8.7
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP request with separator-heavy crafted text
  2. Delivery
    Pass input to TweetTokenizer.tokenize()
  3. Exploit
    Trigger exponential backtracking in URLS naked-domain regex branch
  4. Execution
    Monopolize Python GIL-bound process thread for seconds to minutes
  5. Impact
    Deny 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

nltk 0 <3.10.1

Affected Packages

pypi nltk fix: 3.10.1

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

Vendor (vulncheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 20, 2026 - 23:04 EUVD
CVE Published
Aug 20, 2026 - 22:18 cve.org
HIGH 8.7

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch: NLTK 3.10.1

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
popular Python NLP library widely used in academic and data-pipeline contexts
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy