PT-2026-82080 · Pypi · Nltk
CVSS v4.0
8.2
High
| Vector | AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
NLTK versions prior to 3.10.3
Description
The tgrep module contains a regular expression denial of service (ReDoS) issue. The
tgrep node action() function compiles user-supplied regular expressions within /regex/ pattern nodes and executes them using re.search against tree node labels without validation or timeouts. An attacker controlling the tgrep pattern, such as through tgrep positions() or tgrep compile() exposed to external input, can provide a pattern that triggers catastrophic backtracking—a condition where the regex engine takes an exponential amount of time to process a string—leading to indefinite CPU saturation and blocking the Python process.Recommendations
Update to version 3.10.3 or later.
As a temporary mitigation, restrict external input to the
tgrep positions() and tgrep compile() functions.Exploit
Fix
DoS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Nltk