Skip to content
OpenAdvisories
Medium · 6.9 CVE-2026-126300 EUVD-2026-125221GHSA-ffr9-mgrr-wcvrGHSA-rg32-vgf9-927c

NLTK: Quadratic CPU exhaustion in TreebankWordTokenizer.span_tokenize via list.pop(0) in quote-restore loop

Published Nov 13, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
nltk nltk 3.2.5 <3.10.4 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI nltk >= 3.2.5, < 3.10.4 3.10.4 GHSA-ffr9-mgrr-wcvr

References