Live threats

All CVEs / nltk

CVE-2026-72818nltk

High 8.7 No auth needed

Priority
67
CVSS 4.0
8.7
EPSS
—
Auth required
No
Published
Aug 20, 2026
Updated
Oct 26, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1333
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for nltk.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI nltk < 3.10.1 3.10.1 pip install "nltk>=3.10.1"
PyPI nltk < 3.10.1 3.10.1 pip install "nltk>=3.10.1"

Per OSV / GitHub Advisories (GHSA-qx2g-xrx7-vfh8, PYSEC-2026-3870). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.