CVE-2026-72818
Received Received - Intake

ReDoS in NLTK TweetTokenizer URL Regex

Vulnerability report for CVE-2026-72818, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-20

Last updated on: 2026-08-20

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-20
Last Modified
2026-08-20
Generated
2026-08-21
AI Q&A
2026-08-21
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nltk tweettokenizer 3.10.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1333 The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves a regular expression in the NLTK library's TweetTokenizer that can be exploited to cause denial-of-service. The regex for parsing URLs has an unbounded domain-label prefix, allowing crafted input with many alternating separators to trigger exponential backtracking. This consumes excessive CPU time, stalling services processing untrusted text.

Detection Guidance

This vulnerability can be detected by checking if your system uses TweetTokenizer from NLTK versions before 3.10.1. Inspect Python environments for installed NLTK versions and verify if any application processes untrusted text using TweetTokenizer.tokenize or casual_tokenize.

Impact Analysis

If you use NLTK's TweetTokenizer or casual_tokenize on user-submitted text, attackers could send specially crafted input to slow down or crash your service. This leads to degraded performance or denial of service for legitimate users without requiring authentication.

Compliance Impact

This vulnerability causes denial-of-service via CPU exhaustion when processing crafted input, which could disrupt services handling untrusted text. For GDPR, this may impact availability of personal data processing systems. For HIPAA, it could affect availability of systems handling protected health information. However, the CVE does not explicitly link this issue to compliance violations.

Mitigation Strategies

Upgrade NLTK to version 3.10.1 or later to bound the label repetition in the URLS regular expression. If upgrading is not immediately possible, avoid using TweetTokenizer.tokenize or casual_tokenize on untrusted input until the update is applied.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-72818. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart