---
id: "GHSA-rg32-vgf9-927c"
page: "https://infrastack.ai/live/GHSA-rg32-vgf9-927c"
kind: "vulnerability"
aliases: ["GHSA-rg32-vgf9-927c"]
title: "Duplicate Advisory: Quadratic CPU exhaustion in TreebankWordTokenizer.span_tokenize via list.pop(0) in quote-restore 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", "nlp", "nltk", "package", "python"]
not_affected_if: ["no-untrusted-tokenization", "trusted-input-only"]
published_at: "2026-11-13T12:31:17+00:00"
first_seen_at: "2026-11-13T21:09:39+00:00"
updated_at: "2026-11-13T21:10:52+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-rg32-vgf9-927c", "first_seen_at": "2026-11-13T21:09:39+00:00"}]
exploit_sources: []
---

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

Link for people: https://infrastack.ai/live/GHSA-rg32-vgf9-927c (this .md is for agents)

NLTK's TreebankWordTokenizer.span_tokenize uses repeated list.pop(0) calls, so long runs of double-quote characters make CPU use grow quadratically. An attacker who can submit text to a service that span-tokenizes it can exhaust a CPU core and degrade availability.

_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`
- Search your code for calls to `span_tokenize` on untrusted input

## Fix

- Move `nltk` to `3.10.4` or later (this advisory is withdrawn as a duplicate of GHSA-ffr9-mgrr-wcvr, which the sources do not detail)

## Timeline

- 2026-11-13T21:09:39+00:00 ghsa https://github.com/advisories/GHSA-rg32-vgf9-927c

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-ffr9-mgrr-wcvr. This link is maintained to preserve external references.

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

---

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