medium6.9
CVE-2026-126300
NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause qua…
Impact
NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit long runs of double-quote characters to services span-tokenizing untrusted text, exhausting a CPU core and degrading availability.
An attacker can exploit this over the network, without logging in, without any action by a user. If it succeeds: low risk of outages.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | nltk | < 3.10.4 | none recorded |
Affected products · Nltk
| Product | Affected versions |
|---|---|
| Nltk | from 3.2.5 before 3.10.4 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-rg32-vgf9-927c
- https://github.com/nltk/nltk/security/advisories/GHSA-ffr9-mgrr-wcvr
- https://nvd.nist.gov/vuln/detail/CVE-2026-126300
- https://www.vulncheck.com/advisories/nltk-from-3.2.5-before-3.10.4-cpu-exhaustion-via-treebankwordtokenizer-span-tokenize
- https://github.com/advisories/GHSA-ffr9-mgrr-wcvr
- https://github.com/nltk/nltk/pull/3895
- https://github.com/nltk/nltk/commit/e20c40e26ec9306de885703f6e53250695f1f49b
- https://github.com/nltk/nltk/releases/tag/v3.10.4