CVE-2026-126299
NLTK: Quadratic-time CPU denial of service in CCG lexicon parser (fromstring) on wide bracket bodies and operator chains
8.7
Description
NLTK before 3.10.4 contains a denial of service vulnerability in the CCG lexicon parser fromstring that allows remote attackers to exhaust CPU by supplying wide inputs. Attackers can submit lexicon text with long flat bracket bodies or operator chains, triggering quadratic string re-slicing in matchBrackets and augParseCategory that blocks worker threads.
Affected products and versions
| Product / package | Ecosystem / vendor | Versions | Fixed in | Source |
|---|---|---|---|---|
| nltk | pip | <= 3.10.3 | 3.10.4 | GitHub |