Inefficient regular expression complexity in Natural Language Toolkit - #VU142779
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.corpus.reader.pl196x.TEICorpusView.read_block and Pl196xCorpusReader public methods when parsing attacker-influenced PL196X or TEI-like corpus files. A remote attacker can supply a malformed file with many opening tags and no matching closing tags to cause a denial of service.
The issue is triggered by repeated rescans of whole <text> blocks, leading to quadratic CPU growth and parser-thread stalling before the input is rejected.