{"id":"CVE-2026-72818","state":"PUBLISHED","title":"NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input","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.","publishedAt":"2026-08-20T21:57:34.230Z","updatedAt":"2026-09-24T14:18:57.476Z","severity":{"score":8.7,"label":"High","version":"4.0","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","source":"VulnCheck"},"assigner":"VulnCheck","products":["nltk nltk"],"affected":[{"vendor":"nltk","product":"nltk","packageName":"nltk","packageURL":"pkg:pypi/nltk","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.1","versionType":"semver"},{"version":"3.10.1","status":"unaffected","versionType":"semver"}],"collectionURL":"https://pypi.org","repo":"https://github.com/nltk/nltk","programFiles":["nltk/tokenize/casual.py"]}],"references":["https://github.com/nltk/nltk/issues/3704","https://github.com/nltk/nltk/blob/3.9.4/nltk/tokenize/casual.py","https://github.com/nltk/nltk/releases/tag/v3.10.1","https://github.com/nltk/nltk","https://www.vulncheck.com/advisories/nltk-tweettokenizer-url-pattern-backtracks-catastrophically-on-naked-domain-like-input"],"weaknesses":["CWE-1333"],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/72xxx/CVE-2026-72818.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-72818","state":"PUBLISHED","datePublished":"2026-08-20T21:57:34.230Z","dateUpdated":"2026-09-24T14:18:57.476Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-08-10T15:12:16.754Z"},"containers":{"cna":{"title":"NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"nltk","product":"nltk","packageName":"nltk","packageURL":"pkg:pypi/nltk","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.1","versionType":"semver"},{"version":"3.10.1","status":"unaffected","versionType":"semver"}],"collectionURL":"https://pypi.org","repo":"https://github.com/nltk/nltk","programFiles":["nltk/tokenize/casual.py"]}],"references":[{"url":"https://github.com/nltk/nltk/issues/3704","tags":["issue-tracking"],"name":"GitHub Issue #3704"},{"url":"https://github.com/nltk/nltk/blob/3.9.4/nltk/tokenize/casual.py","tags":["technical-description"],"name":"Unbounded naked-domain branch in the URLS pattern at 3.9.4"},{"url":"https://github.com/nltk/nltk/releases/tag/v3.10.1","tags":["release-notes"],"name":"NLTK v3.10.1 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","name":"VulnCheck Advisory: NLTK TweetTokenizer URL Pattern Backtracks Catastrophically on Naked-Domain-Like Input","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"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","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.7,"baseSeverity":"HIGH"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1333","lang":"en","description":"Inefficient Regular Expression Complexity","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-09-24T14:18:57.476Z"},"datePublic":"2026-07-12T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.9.3:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.9.2:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.9.1:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.9:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.9:beta1:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.8.1:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.8:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.7:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.6.5:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.6.6:*:*:*:*:*:*:*"},{"vulnerable":true,"criteria":"cpe:2.3:a:nltk:nltk:3.6.7:*:*:*:*:*:*:*"}]}]}],"credits":[{"lang":"en","value":"George Chen","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/nltk/nltk/issues/3704","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-21T11:05:49.886911Z","id":"CVE-2026-72818","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-21T11:06:07.858Z"}}]}}}