{"id":"CVE-2026-80205","aliases":["CVE-2026-80205","GHSA-rrv8-h7p8-rx55","PYSEC-2026-3750"],"related":[],"kind":"vulnerability","state":"published","title":"NLTK before 3.10.0 ReDoS via Text.findall() unvalidated regex","summary":"NLTK versions before 3.10.0 contain a regular expression denial of service vulnerability in Text.findall() and TokenSearcher.findall() methods that accept user-supplied regular expressions without validation or timeout. Attackers can supply crafted regex patterns that cause catastrophic backtracking, resulting in indefinite CPU saturation and denial of service to all users of the Python process.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"NLTK versions before 3.10.0 contain a regular expression denial of service vulnerability in Text.findall() and TokenSearcher.findall() methods that accept user-supplied regular expressions without validation or timeout. Attackers can supply crafted regex patterns that cause catastrophic backtracking, resulting in indefinite CPU saturation and denial of service to all users of the Python process.","source":"cvelist"},{"lang":"en","text":"### Summary\nNLTK's `Text.findall()` and `TokenSearcher.findall()` methods accept user-supplied regular expressions and pass them to the Python `re` engine without timeout or validation, enabling catastrophic backtracking (ReDoS). This issue is isolated to the `nltk.text` module and was resolved in a prior commit.\n\n### Affected Code\n`nltk/text.py` — `TokenSearcher.findall()` (line 255) / `Text.findall()` (line 620)\n\n`TokenSearcher.__init__` builds an internal string by wrapping each token in angle brackets. The `findall()` method preprocesses the caller-supplied regexp and runs it directly against this string with no timeout:\n\n```python\ndef findall(self, regexp):\n    # Preprocessing does NOT prevent catastrophic backtracking\n    regexp = re.sub(r\"\\s\", \"\", regexp)\n    regexp = re.sub(r\"<\", \"(?:<(?:\", regexp)\n    regexp = re.sub(r\">\", \")>)\", regexp)\n    regexp = re.sub(r\"(?<!\\\\)\\.\", \"[^>]\", regexp)\n\n    # User-controlled regexp executed with no timeout\n    hits = re.findall(regexp, self._raw)\n```\nThe preprocessing transforms `<` and `>` angle-bracket syntax but does not inspect or reject catastrophically backtracking patterns.\n\n### Proof of Concept\n```python\nimport nltk\nimport time\n\n# Token of 25 'a' characters produces self._raw = \"<aaaaaaaaaaaaaaaaaaaaaaaa!>\"\n# The trailing '!' ensures no match, forcing full backtracking.\ntext = nltk.Text([\"a\" * 25 + \"!\"])\n\n# Pattern after transformation:\n#   <  →  (?:<(?:\n#   >  →  )>)\n# Becomes: (?:<(?:((a+)+)b)>)\n# re.findall runs this against \"<aaaaaaaaaaaaaaaaaaaaaaaa!>\" — hangs.\n\nstart = time.time()\ntext.findall(r\"<((a+)+)b>\")   # Never returns\n```\n\n### Impact\nApplications that expose `Text.findall()` to external input are vulnerable to a denial of service. An unauthenticated attacker can cause indefinite CPU saturation with one request, denying service to all other users of the Python process.\n\n### Remediation\nThis vulnerability was patched in commit `d8e4753`. Users should update to the patched version.\n\n### Credit\nTool: Kira by [Offgrid Security](https://www.offgridsec.com)","format":"markdown","source":"ghsa"}],"published":"2026-08-26T10:28:14.352Z","modified":"2026-09-08T20:45:04.338Z","severity":{"scorer":"VulnCheck","scheme":"CVSS: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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS: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","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS: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","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS: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/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"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.10.0","status":"affected"},{"type":"semver","version":"3.10.0","status":"unaffected"}],"vendor":"nltk","product":"nltk","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.10.0"}],"ecosystem":"PyPI","package":"nltk","purl":"pkg:pypi/nltk","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.10.0"}],"vendor":"nltk","product":"nltk","cpe":"cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.10.0"}],"ecosystem":"PyPI","package":"nltk","purl":"pkg:pypi/nltk","source":"pysec"}],"references":[{"url":"https://github.com/nltk/nltk/security/advisories/GHSA-rrv8-h7p8-rx55","tags":["evidence","exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/nltk-before-3.10.0-redos-via-text-findall-unvalidated-regex","tags":["advisory","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"http://www.openwall.com/lists/oss-security/2026/09/01/3","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-80205","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk/pull/3674","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk/commit/d8e47539317b571ab1422981f5b9653d5eae1249","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/nltk/nltk/releases/tag/v3.10.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3750.yaml","tags":["web"],"sources":["ghsa"]}],"credits":["infycore","ekaf","agent-kira"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-26T15:58:57.043Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-80205","url":"https://www.cve.org/CVERecord?id=CVE-2026-80205","licence":"CVE Terms of Use","modified":"2026-09-01T22:06:44.235Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rrv8-h7p8-rx55","url":"https://github.com/advisories/GHSA-rrv8-h7p8-rx55","licence":"CC-BY-4.0","modified":"2026-09-08T20:45:04.338Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-80205","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-80205","licence":"Public domain","modified":"2026-09-03T05:15:15.430Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3750","url":"https://osv.dev/vulnerability/PYSEC-2026-3750","licence":"CC-BY-4.0","modified":"2026-09-02T09:00:04.186Z"}],"updatedAt":"2026-11-25T22:59:35.362Z","epss":{"score":0.00651,"percentile":0.52494,"date":"2026-12-01T12:00:22.000Z"}}