PyPI: nltk
CVE-2026-80205
Safety vulnerability ID: SFTY-20260908-36021
Affected versions of the NLTK package are vulnerable to Regular Expression Denial of Service (ReDoS) due to unvalidated user-supplied regular expressions. The `nltk.text.Text.findall()` and `nltk.text.TokenSearcher.findall()` methods pass user-controlled regular expressions directly to the Python `re` engine without implementing a timeout or validation mechanism, leading to potential catastrophic backtracking. An attacker can exploit this vulnerability by providing a specially crafted regular expression that triggers excessive backtracking, resulting in indefinite CPU saturation and denial-of-service for applications that expose these methods to external input.
Overview
NLTK: ReDoS in nltk.text.Text.findall() via unvalidated user-supplied regular expressions
Advisory
nltk – Regular Expression Denial of Service (ReDoS)
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260908-36021/CVE-2026-80205
- https://github.com/nltk/nltk/security/advisories/GHSA-rrv8-h7p8-rx55
- https://nvd.nist.gov/vuln/detail/CVE-2026-80205
- https://github.com/nltk/nltk/pull/3674
- https://github.com/nltk/nltk/commit/d8e47539317b571ab1422981f5b9653d5eae1249
- https://github.com/nltk/nltk/releases/tag/v3.10.0
- https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3750.yaml
- https://www.vulncheck.com/advisories/nltk-before-3.10.0-redos-via-text-findall-unvalidated-regex
- http://www.openwall.com/lists/oss-security/2026/09/01/3
- https://github.com/advisories/GHSA-rrv8-h7p8-rx55
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
