Skip to content

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

HighCVSS 8.7 EPSS 0.74%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

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.

Upgrade path

13 packages: 2 fixed, 11 with no fix yet.

PackageAffectedFixed inStatus
debian/nltk(Debian 12) = 3.8-1; = 3.8.1-1; = 3.9.1-1; = 3.9.1-2 +6 more No fix listed No fix yet
debian/nltk(Debian 13) = 3.9.1-2; = 3.9.2-1; = 3.9.3-1; = 3.10.0-1 +3 more No fix listed No fix yet
redhat/ansible-automation-platform-25/lightspeed-chatbot-rhel8(Red Hat ansible_automation_platform 2) All versions No fix listed No fix yet
redhat/lightspeed-core/lightspeed-stack-rhel9(Red Hat lightspeed_core) All versions No fix listed No fix yet
redhat/lightspeed-core/rag-tool-cpu-rhel9(Red Hat lightspeed_core) All versions No fix listed No fix yet
redhat/lightspeed-core/rag-tool-cuda-12.9-rhel9(Red Hat lightspeed_core) All versions No fix listed No fix yet
redhat/openshift-lightspeed/lightspeed-service-api-rhel9(Red Hat openshift_lightspeed 1) All versions No fix listed No fix yet
ubuntu/nltk(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/nltk(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/nltk(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/nltk(Ubuntu 26.10) All versions No fix listed No fix yet
debian/nltk(Debian 14) < 3.10.3-1; = 3.9.1-2; = 3.9.2-1; = 3.9.3-1 +2 more 3.10.3-1 Fixed
pypi nltk(PyPI) < 3.10.1; = 0.8; = 0.9; = 0.9.3 +63 more 3.10.1 Fixed

Affected products

ProductAffected versionsFixed in
pypi nltk(PyPI) < 3.10.1 3.10.1
pypi nltk(PyPI) = 0.8 No fix listed
pypi nltk(PyPI) = 0.9 No fix listed
pypi nltk(PyPI) = 0.9.3 No fix listed
pypi nltk(PyPI) = 0.9.4 No fix listed
pypi nltk(PyPI) = 0.9.5 No fix listed
pypi nltk(PyPI) = 0.9.6 No fix listed
pypi nltk(PyPI) = 0.9.7 No fix listed
pypi nltk(PyPI) = 0.9.8 No fix listed
pypi nltk(PyPI) = 0.9.9 No fix listed
pypi nltk(PyPI) = 2.0.1 No fix listed
pypi nltk(PyPI) = 2.0.1rc1 No fix listed
pypi nltk(PyPI) = 2.0.1rc2-git No fix listed
pypi nltk(PyPI) = 2.0.1rc3 No fix listed
pypi nltk(PyPI) = 2.0.1rc4 No fix listed
pypi nltk(PyPI) = 2.0.2 No fix listed
pypi nltk(PyPI) = 2.0.3 No fix listed
pypi nltk(PyPI) = 2.0.4 No fix listed
pypi nltk(PyPI) = 2.0.5 No fix listed
pypi nltk(PyPI) = 2.0b4 No fix listed
pypi nltk(PyPI) = 2.0b5 No fix listed
pypi nltk(PyPI) = 2.0b6 No fix listed
pypi nltk(PyPI) = 2.0b7 No fix listed
pypi nltk(PyPI) = 2.0b8 No fix listed
pypi nltk(PyPI) = 2.0b9 No fix listed
Show 74 more
ProductAffected versionsFixed in
pypi nltk(PyPI) = 3.0.0 No fix listed
pypi nltk(PyPI) = 3.0.0b1 No fix listed
pypi nltk(PyPI) = 3.0.0b2 No fix listed
pypi nltk(PyPI) = 3.0.1 No fix listed
pypi nltk(PyPI) = 3.0.2 No fix listed
pypi nltk(PyPI) = 3.0.3 No fix listed
pypi nltk(PyPI) = 3.0.4 No fix listed
pypi nltk(PyPI) = 3.0.5 No fix listed
pypi nltk(PyPI) = 3.1 No fix listed
pypi nltk(PyPI) = 3.10.0 No fix listed
pypi nltk(PyPI) = 3.2 No fix listed
pypi nltk(PyPI) = 3.2.1 No fix listed
pypi nltk(PyPI) = 3.2.2 No fix listed
pypi nltk(PyPI) = 3.2.3 No fix listed
pypi nltk(PyPI) = 3.2.4 No fix listed
pypi nltk(PyPI) = 3.2.5 No fix listed
pypi nltk(PyPI) = 3.3 No fix listed
pypi nltk(PyPI) = 3.4 No fix listed
pypi nltk(PyPI) = 3.4.1 No fix listed
pypi nltk(PyPI) = 3.4.2 No fix listed
pypi nltk(PyPI) = 3.4.3 No fix listed
pypi nltk(PyPI) = 3.4.4 No fix listed
pypi nltk(PyPI) = 3.4.5 No fix listed
pypi nltk(PyPI) = 3.5 No fix listed
pypi nltk(PyPI) = 3.5b1 No fix listed
pypi nltk(PyPI) = 3.6 No fix listed
pypi nltk(PyPI) = 3.6.1 No fix listed
pypi nltk(PyPI) = 3.6.2 No fix listed
pypi nltk(PyPI) = 3.6.3 No fix listed
pypi nltk(PyPI) = 3.6.4 No fix listed
pypi nltk(PyPI) = 3.6.5 No fix listed
pypi nltk(PyPI) = 3.6.6 No fix listed
pypi nltk(PyPI) = 3.6.7 No fix listed
pypi nltk(PyPI) = 3.7 No fix listed
pypi nltk(PyPI) = 3.8 No fix listed
pypi nltk(PyPI) = 3.8.1 No fix listed
pypi nltk(PyPI) = 3.9 No fix listed
pypi nltk(PyPI) = 3.9.1 No fix listed
pypi nltk(PyPI) = 3.9.2 No fix listed
pypi nltk(PyPI) = 3.9.3 No fix listed
pypi nltk(PyPI) = 3.9.4 No fix listed
pypi nltk(PyPI) = 3.9b1 No fix listed
redhat/lightspeed-core/lightspeed-stack-rhel9(Red Hat:lightspeed_core) All versions No fix listed
redhat/lightspeed-core/rag-tool-cpu-rhel9(Red Hat:lightspeed_core) All versions No fix listed
redhat/lightspeed-core/rag-tool-cuda-12.9-rhel9(Red Hat:lightspeed_core) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-service-api-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/ansible-automation-platform-25/lightspeed-chatbot-rhel8(Red Hat:ansible_automation_platform:2) All versions No fix listed
debian/nltk(Debian:12) All versions No fix listed
debian/nltk(Debian:12) = 3.10.0-1 No fix listed
debian/nltk(Debian:12) = 3.10.1-1 No fix listed
debian/nltk(Debian:12) = 3.10.3-1 No fix listed
debian/nltk(Debian:12) = 3.8-1 No fix listed
debian/nltk(Debian:12) = 3.8.1-1 No fix listed
debian/nltk(Debian:12) = 3.9.1-1 No fix listed
debian/nltk(Debian:12) = 3.9.1-2 No fix listed
debian/nltk(Debian:12) = 3.9.2-1 No fix listed
debian/nltk(Debian:12) = 3.9.3-1 No fix listed
debian/nltk(Debian:13) All versions No fix listed
debian/nltk(Debian:13) = 3.10.0-1 No fix listed
debian/nltk(Debian:13) = 3.10.1-1 No fix listed
debian/nltk(Debian:13) = 3.10.3-1 No fix listed
debian/nltk(Debian:13) = 3.9.1-2 No fix listed
debian/nltk(Debian:13) = 3.9.2-1 No fix listed
debian/nltk(Debian:13) = 3.9.3-1 No fix listed
debian/nltk(Debian:14) < 3.10.3-1 3.10.3-1
debian/nltk(Debian:14) = 3.10.0-1 No fix listed
debian/nltk(Debian:14) = 3.10.1-1 No fix listed
debian/nltk(Debian:14) = 3.9.1-2 No fix listed
debian/nltk(Debian:14) = 3.9.2-1 No fix listed
debian/nltk(Debian:14) = 3.9.3-1 No fix listed
ubuntu/nltk(Ubuntu:22.04) All versions No fix listed
ubuntu/nltk(Ubuntu:24.04) All versions No fix listed
ubuntu/nltk(Ubuntu:26.04) All versions No fix listed
ubuntu/nltk(Ubuntu:26.10) All versions No fix listed

References