Inefficient regular expression complexity in Natural Language Toolkit - CVE-2026-129229
Published: November 16, 2026
Vulnerability details
The vulnerability allows a remote attacker to exhaust CPU resources and cause a denial of service.
The vulnerability exists due to unbounded quadratic regular-expression compilation in NLTK search and tokenizer functions when processing caller-controlled patterns without group-count limits, outside the matching timeout. A remote attacker can submit a pattern such as "()" * 25000 through an application exposing Text.findall(), TokenSearcher.findall(), or RegexpTokenizer to trigger expensive synchronous compilation and exhaust CPU cores through repeated or concurrent requests.