Inefficient regular expression complexity in Natural Language Toolkit - #VU142776
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 the nltk tgrep module _tgrep_node_action() function when processing user-supplied regular expressions in /regex/ nodes. A remote attacker can send a specially crafted tgrep pattern to cause a denial of service.
Applications are affected when they expose the tgrep API to external input, including via tgrep_positions() or tgrep_compile().