Inefficient regular expression complexity in Natural Language Toolkit - #VU142779

 

Inefficient regular expression complexity in Natural Language Toolkit - #VU142779

Published: August 15, 2026


Vulnerability identifier: #VU142779
CSH Severity: Low
CVSS v4: 6.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-1333
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

Natural Language Toolkit

Remediation

Install security update from vendor's website.

Natural Language Toolkit - update to 3.10.3

External References

Related Security Bulletins