Inefficient regular expression complexity in Natural Language Toolkit - #VU142772
Published: August 15, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to inefficient regular expression complexity in nltk.text.Text.findall() and nltk.text.TokenSearcher.findall() when processing user-supplied regular expressions. A remote attacker can send a specially crafted regular expression to cause a denial of service.
The issue is isolated to the nltk.text module and can result in indefinite CPU saturation through catastrophic backtracking in the Python re engine.