---
id: "GHSA-x4p7-2mv3-x7px"
page: "https://infrastack.ai/live/GHSA-x4p7-2mv3-x7px"
kind: "vulnerability"
aliases: ["GHSA-x4p7-2mv3-x7px"]
title: "Duplicate Advisory: Quadratic CPU exhaustion in LegalitySyllableTokenizer.tokenize via unguarded onset reversal loop"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "nltk", "fixed": [], "affected": "< 3.10.4", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-407", "nltk", "package", "python", "web-services"]
not_affected_if: ["tokenizer-unused", "trusted-input-only"]
published_at: "2026-11-13T12:31:17+00:00"
first_seen_at: "2026-11-16T14:51:33+00:00"
updated_at: "2026-11-16T14:51:49+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-x4p7-2mv3-x7px", "first_seen_at": "2026-11-16T14:51:33+00:00"}]
exploit_sources: []
---

# Duplicate Advisory: Quadratic CPU exhaustion in LegalitySyllableTokenizer.tokenize via unguarded onset reversal loop

Link for people: https://infrastack.ai/live/GHSA-x4p7-2mv3-x7px (this .md is for agents)

NLTK's LegalitySyllableTokenizer uses a loop that does quadratic work on long all-vowel tokens. An attacker who can supply such text can tie up CPU and deny service to code that syllabifies text.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:nltk affected < 3.10.4 fixed no fixed version listed

## How to check

- Check the installed NLTK version with `pip show nltk`
- Look for calls to LegalitySyllableTokenizer in code that handles untrusted input

## Fix

- `nltk` 3.10.4 or later, per the affected range in this advisory
- This advisory is withdrawn as a duplicate; the canonical advisory is GHSA-gpwc-27cw-rh9r

## Timeline

- 2026-11-16T14:51:33+00:00 ghsa https://github.com/advisories/GHSA-x4p7-2mv3-x7px

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-gpwc-27cw-rh9r. This link is maintained to preserve external references.

## Original 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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
