---
id: "GHSA-4hvg-fv5c-9936"
page: "https://infrastack.ai/live/GHSA-4hvg-fv5c-9936"
kind: "vulnerability"
aliases: ["GHSA-4hvg-fv5c-9936"]
title: "Duplicate Advisory: Unbounded CPU consumption in NLTK SteppingRecursiveDescentParser.parse() with ambiguous or self-embedding grammars"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "nltk", "fixed": [], "affected": "<= 3.10.3", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-400", "nltk", "package", "python"]
not_affected_if: ["no-stepping-parser", "trusted-grammars-only"]
published_at: "2026-11-13T12:31:17+00:00"
first_seen_at: "2026-11-13T20:59:21+00:00"
updated_at: "2026-11-13T21:00:18+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-4hvg-fv5c-9936", "first_seen_at": "2026-11-13T20:59:21+00:00"}]
exploit_sources: []
---

# Duplicate Advisory: Unbounded CPU consumption in NLTK SteppingRecursiveDescentParser.parse() with ambiguous or self-embedding grammars

Link for people: https://infrastack.ai/live/GHSA-4hvg-fv5c-9936 (this .md is for agents)

This advisory is withdrawn as a duplicate of GHSA-8fx7-8jr8-84rv, which covers the same NLTK parser flaw. The original text says an attacker who controls the grammar can supply an ambiguous self-embedding grammar and short input to make SteppingRecursiveDescentParser.parse() run without limit, pinning CPU cores.

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

## Affected

- pypi:nltk affected <= 3.10.3 fixed no fixed version listed

## How to check

- Check the installed NLTK version with `pip show nltk`.
- Search code for `SteppingRecursiveDescentParser` and check whether grammars come from untrusted input.

## Fix

- `nltk` before `3.10.4` per the original description; the fixed version in the product data is not stated.

## Timeline

- 2026-11-13T20:59:21+00:00 ghsa https://github.com/advisories/GHSA-4hvg-fv5c-9936

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-8fx7-8jr8-84rv. This link is maintained to preserve external references.

## Original Description
NLTK before 3.10.4 contains an uncontrolled resource consumption vulnerability in SteppingRecursiveDescentParser.parse() that lacks any max_time deadline or step limit. Attackers influencing the grammar can supply an ambiguous self-embedding grammar and short token input to force unbounded top-down search, pinning CPU cores and exhausting worker pools.

---

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