{"id":"CVE-2026-72818","published":"2026-08-20T21:57:34Z","modified":"2026-09-24T14:18:57Z","title":"NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input","vendor":"nltk","product":"nltk","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00742,"percentile":0.50757,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/nltk/nltk/issues/3704","tags":["issue-tracking"]},{"url":"https://github.com/nltk/nltk/blob/3.9.4/nltk/tokenize/casual.py","tags":["technical-description"]},{"url":"https://github.com/nltk/nltk/releases/tag/v3.10.1","tags":["release-notes"]},{"url":"https://github.com/nltk/nltk","tags":["product"]},{"url":"https://www.vulncheck.com/advisories/nltk-tweettokenizer-url-pattern-backtracks-catastrophically-on-naked-domain-like-input","tags":["third-party-advisory"]}],"priority":{"score":15.4,"factors":[{"name":"EPSS percentile","points":10.15},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"nltk","affectedVersions":[{"vendor":"nltk","product":"nltk","versions":["< 3.10.1"]}],"fixedVersions":[{"vendor":"nltk","product":"nltk","versions":["3.10.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-08-21T11:05:49.886911Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"nltk","vulnerableRanges":["<3.10.1"],"patched":["3.10.1"],"from":["GHSA-qx2g-xrx7-vfh8","PYSEC-2026-3870"],"provenance":"source"}],"summary":{"text":"The URLS regular expression in NLTK's nltk/tokenize/casual.py, used by TweetTokenizer.WORD_RE and TweetTokenizer.tokenize, has an unbounded domain-label prefix in its naked-domain branch that causes catastrophic backtracking on crafted input. An unauthenticated remote attacker who can get text to a service applying TweetTokenizer or casual_tokenize to it can stall processing with only a few kilobytes of input, with no user interaction or special configuration required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:14:09Z"},"euvd":{"id":"EUVD-2026-63729","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-65915","published":"2026-08-22","fixed":"3.10.0","kev":false},{"cve":"CVE-2026-78683","published":"2026-08-25","fixed":"3.10.0","kev":false},{"cve":"CVE-2026-80205","published":"2026-08-26","fixed":"3.10.0","kev":false},{"cve":"CVE-2026-72818","published":"2026-08-20","fixed":"3.10.1","kev":false},{"cve":"CVE-2026-62383","published":"2026-08-22","fixed":"3.10.2","kev":false,"link":{"from":"CVE-2026-72818","to":"CVE-2026-62383","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:nltk","fromFixed":"3.10.1","toFixed":"3.10.2","daysApart":2}]}},{"cve":"CVE-2026-62384","published":"2026-08-22","fixed":"3.10.2","kev":false,"link":{"from":"CVE-2026-72818","to":"CVE-2026-62384","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:nltk","fromFixed":"3.10.1","toFixed":"3.10.2","daysApart":2}]}},{"cve":"CVE-2026-71513","published":"2026-08-22","fixed":"3.10.3","kev":false}],"package":"PyPI:nltk"}}