CVE-2026-126301

NLTK: Quadratic CPU exhaustion in LegalitySyllableTokenizer.tokenize via unguarded onset reversal loop

Medium published · updated · also known as GHSA-GPWC-27CW-RH9R

6.9
CVSS score out of 10 · NVD (vulncheck.com)

Description

NLTK from 3.6 before 3.10.4 contains an algorithmic complexity vulnerability in LegalitySyllableTokenizer.tokenize that allows remote attackers to exhaust CPU by supplying long all-vowel tokens. Attackers can submit a token such as a long run of vowels, causing the unguarded onset reversal loop to perform quadratic work and deny service to syllabification components.

Affected products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
nltk pip >= 3.6, <= 3.10.33.10.4 GitHub

References