---
id: "CVE-2026-126299"
page: "https://infrastack.ai/live/CVE-2026-126299"
kind: "vulnerability"
aliases: ["CVE-2026-126299"]
title: "NLTK: crafted CCG lexicon input exhausts CPU and blocks worker threads"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["nlp", "nltk", "package", "python"]
not_affected_if: ["ccg-unused", "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:28+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126299", "first_seen_at": "2026-11-13T10:47:14+00:00"}]
exploit_sources: []
---

# NLTK: crafted CCG lexicon input exhausts CPU and blocks worker threads

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

NLTK's CCG lexicon parser fromstring takes quadratic time on long bracket bodies or operator chains in lexicon text. A remote attacker who supplies such input can exhaust CPU and block worker threads, causing denial of service.

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

## How to check

- Check the installed NLTK version with `python -c "import nltk; print(nltk.__version__)"`
- Look for calls to the CCG lexicon parser (`nltk.ccg` lexicon fromstring) that handle untrusted input

## Fix

- NLTK `3.10.4` (fixed version stated for NLTK before 3.10.4)

## Timeline

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

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nltk/nltk/security/advisories/GHSA-89p3-fcch-88ph
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/nltk-before-3.10.4-quadratic-time-denial-of-service-via-ccg-lexicon-fromstring

## From the sources

NLTK before 3.10.4 contains a denial of service vulnerability in the CCG lexicon parser fromstring that allows remote attackers to exhaust CPU by supplying wide inputs. Attackers can submit lexicon text with long flat bracket bodies or operator chains, triggering quadratic string re-slicing in matchBrackets and augParseCategory that blocks worker threads.

---

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