CVE-2026-126303

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

High published · updated · also known as GHSA-8FX7-8JR8-84RV

8.7
CVSS score out of 10 · NVD (vulncheck.com)

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.

Affected products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
nltk pip <= 3.10.33.10.4 GitHub

References