CVE-2026-72818
published high CVSS 4.0 · 8.7NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nltk | — | nltk0 to < 3.10.1 (affected · semver) · 3.10.1 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nltk | nltk | 0 to < 3.10.1 (affected · semver)3.10.1 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-1333 Inefficient Regular Expression Complexity
References
5- https://github.com/nltk/nltk
- Unbounded naked-domain branch in the URLS pattern at 3.9.4 https://github.com/nltk/nltk/blob/3.9.4/nltk/tokenize/casual.py
- GitHub Issue #3704 https://github.com/nltk/nltk/issues/3704
- NLTK v3.10.1 Release Notes https://github.com/nltk/nltk/releases/tag/v3.10.1
- VulnCheck Advisory: NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input https://www.vulncheck.com/advisories/nltk-tweettokenizer-url-pattern-backtracks-catastrophically-on-naked-domain-like-input
Provider assertions
2VulnCheck · cna
NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 77ae6ded1f9a0b164eccb9a9f03467aed1fc24f83fd5a3f4dbcd2a84f4c79c17
- Ingested
- 30 Sep 2026, 15:32:47 UTC
- Source record
- Official CVE record