ZeroHour

CVE-2026-81724

PoC large

Uncontrolled Recursion DoS in NLTK Feature Structure Parser

CVSS 4.0
6.9 medium
EPSS
<1%p19
Published
()
Modified
AI analysis

NLTK (the Natural Language Toolkit for Python) before version 3.10.3 contains an uncontrolled recursion flaw (CWE-674) in nltk.featstruct.FeatStructReader, the component that parses feature structures and feature grammars. An attacker who can get crafted input to this parser submits trivial payloads made of deeply nested brackets that push past Python's recursion limit, raising an unhandled RecursionError. The result is denial of service: the process parsing the input crashes, with no confidentiality or integrity impact and no authentication required (CVSS 4.0 6.9, network vector). Any deployment running a vulnerable NLTK version whose code parses user-supplied feature structures or feature grammars is affected; the library is broadly installed across Python NLP environments, though this specific parsing path is a less commonly used feature. No in-the-wild exploitation is known (not in CISA KEV, EPSS roughly 0.3%), but a public advisory with a proof-of-concept crash exists (GHSA-cw6x-m8jw-qmrh), so the status is public PoC only.

What to do: Upgrade to NLTK 3.10.3 or later. As an interim mitigation, identify any services that pass untrusted input to nltk.featstruct.FeatStructReader or feature-grammar parsing, and depth-limit or reject deeply nested bracket input (or wrap the parse call to catch RecursionError) until patched.

Affected
nltkAll versions before 3.10.3 (fixed in 3.10.3)
Estimated exposure
large~100,000+ Python environments (NLTK is installed in millions of environments; only those parsing untrusted feature structures/grammars are plausibly exposed) — NLTK is among the most-downloaded Python NLP packages (tens of millions of PyPI downloads per month), but the vulnerable FeatStructReader code path is a niche feature used mainly for feature-grammar parsing, so the plausibly affected…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

NLTK before 3.10.3 contains an uncontrolled recursion vulnerability in nltk.featstruct.FeatStructReader that allows unauthenticated attackers to cause a denial of service by supplying deeply nested feature-structure input. Attackers can craft trivial payloads with nested brackets that exceed Python's recursion limit and raise an unhandled RecursionError, crashing applications that parse user-supplied feature structures or feature grammars.

Vendors
nltk
Products
nltk
Weakness
CWE-674
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.