Inefficient regular expression complexity in Natural Language Toolkit - CVE-2026-12061
Published: November 22, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service in applications that process untrusted review corpora with NLTK.
The vulnerability exists due to an unbounded greedy match in the ReviewsCorpusReader FEATURES regular expression, which can cause quadratic backtracking when scanning review lines for feature annotations. A remote attacker can supply a corpus containing a crafted review line to consume excessive CPU time and stall calls to reviews(), features(), or sents().