---
id: "CVE-2026-126298"
page: "https://infrastack.ai/live/CVE-2026-126298"
kind: "vulnerability"
aliases: ["CVE-2026-126298"]
title: "NLTK: treebank parsing lets remote input exhaust CPU and stall processing"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "nltk", "fixed": [], "affected": "", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["nlp", "nltk", "package", "python"]
not_affected_if: ["nltk-not-installed", "trusted-input-only"]
published_at: "2026-11-13T10:17:34+00:00"
first_seen_at: "2026-11-13T10:47:14+00:00"
updated_at: "2026-11-13T10:50:34+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126298", "first_seen_at": "2026-11-13T10:47:14+00:00"}]
exploit_sources: []
---

# NLTK: treebank parsing lets remote input exhaust CPU and stall processing

Link for people: https://infrastack.ai/live/CVE-2026-126298 (this .md is for agents)

NLTK before 3.10.4 has a quadratic-time slowdown in Tree.chomsky_normal_form, which uses list.pop(0) during binarization. A remote attacker who supplies a wide, flat treebank tree to Tree.fromstring can tie up a CPU core for tens of seconds and block the processing thread.

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

## Affected

- pypi:nltk affected range not listed fixed no fixed version listed

## How to check

- Check the installed NLTK version with `pip show nltk` or `python -c "import nltk; print(nltk.__version__)"`.
- Look for code that calls `Tree.fromstring` or `chomsky_normal_form` on input from users or external sources.

## Fix

- NLTK: upgrade to `3.10.4` or later.

## Timeline

- 2026-11-13T10:47:14+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126298

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nltk/nltk/security/advisories/GHSA-r53h-rw34-8h97
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/nltk-before-3.10.4-quadratic-cpu-denial-of-service-via-tree-chomsky-normal-form

## From the sources

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_
