NLTK
NLTK 3.10.2 Regular Expression Denial of Service via tgrep
NLTK before 3.10.3 contains a regular expression denial of service (ReDoS) vulnerability in the tgrep module. The _tgrep_node_action function compiles user-supplied regular expressions embedded in /regex/ pattern nodes and executes them via re.search against tree node labels without any validation or timeout. An attacker who controls the tgrep pattern (e.g., via tgrep_positions() or tgrep_compile() exposed to external input) can supply a pattern that triggers catastrophic backtracking, causing indefinite CPU saturation that blocks the Python process.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.2high · scored by CNA · CWE-1333
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
nltk nltk
- < 3.10.3
Fixed in 3.10.3
Mitigation
Upgrade nltk to 3.10.3 or later.
References
- Vendor advisory github.com/nltk/nltk/security/advisories/GHSA-…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.