---
id: "GHSA-6665-2vj3-h76r"
page: "https://infrastack.ai/live/GHSA-6665-2vj3-h76r"
kind: "vulnerability"
aliases: ["GHSA-6665-2vj3-h76r"]
title: "Duplicate Advisory: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0)"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "nltk", "fixed": [], "affected": "< 3.10.4", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-400", "nlp", "nltk", "package", "python"]
not_affected_if: ["method-not-used", "trusted-input-only"]
published_at: "2026-11-13T12:31:16+00:00"
first_seen_at: "2026-11-14T00:08:54+00:00"
updated_at: "2026-11-14T00:10:24+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-6665-2vj3-h76r", "first_seen_at": "2026-11-14T00:08:54+00:00"}]
exploit_sources: []
---

# Duplicate Advisory: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0)

Link for people: https://infrastack.ai/live/GHSA-6665-2vj3-h76r (this .md is for agents)

NLTK before 3.10.4 has a quadratic-time loop in Tree.chomsky_normal_form that uses list.pop(0) during right-factor binarization. An remote attacker who supplies a wide, flat treebank tree to Tree.fromstring can tie up a thread for tens of seconds.

_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 code that calls `Tree.fromstring` on untrusted input followed by `chomsky_normal_form`

## Fix

- `nltk` `3.10.4` or later, per the affected range in the advisory data
- The advisory is withdrawn as a duplicate; the fix is tracked under GHSA-r53h-rw34-8h97

## Timeline

- 2026-11-14T00:08:54+00:00 ghsa https://github.com/advisories/GHSA-6665-2vj3-h76r

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-r53h-rw34-8h97. This link is maintained to preserve external references.

## Original Description
NLTK before 3.10.4 contains a denial of service vulnerability in Tree.chomsky_normal_form that allows remote attackers to exhaust CPU through quadratic-time right-factor binarization using list.pop(0). Attackers can supply a wide flat treebank tree parsed by Tree.fromstring to force tens of seconds of single-threaded CPU consumption, blocking the processing thread.

---

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