XML Processing Vulnerability in NLTK Python Toolkit
CVE-2026-128139
7.5HIGH
What is CVE-2026-128139?
The Natural Language Toolkit (NLTK) version 3.6 to 3.10.3 contains a vulnerability in the XML corpus reading functionality. Specifically, the XMLCorpusView._read_xml_fragment method can result in significant CPU consumption when handling large comments or CDATA sections in attacker-controlled corpus files. This occurs due to inefficient XML validation processes that can lead to quadratic processing time, potentially disrupting the performance of applications utilizing the toolkit. Version 3.10.4 addresses this issue and improves XML handling capabilities.
Affected Version(s)
nltk >= 3.6, < 3.10.4
