CVEfocus › CVE database › CVE-2026-72818

CVE-2026-72818NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input

CVSS 7.5 HighEPSS 0.7% (higher than 51% of CVEs)Published 2026-08-20Updated 2026-09-24Assigner: VulnCheck

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.

CWE-1333

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
10Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 26.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 24.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 22.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 20.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 18.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 16.04nltkFix pendingUBUNTU-CVE-2026-72818
Ubuntu 14.04nltkFix pendingUBUNTU-CVE-2026-72818
Debian 14nltkFixed3.10.3-1DEBIAN-CVE-2026-72818
Debian 13nltkFix pendingDEBIAN-CVE-2026-72818
Debian 12nltkFix pendingDEBIAN-CVE-2026-72818
PyPI librarynltkFixed3.10.1PYSEC-2026-3870

What the vendor says

As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.