CVE Feed
5.3 Medium

NLTK: Uncontrolled recursion in CCG lexicon parser causes denial of service via deeply nested category input

CVE-2026-129224

Root Cause The CCG lexicon parser recurses on nested parenthesised categories without any depth bound. matchBrackets (nltk/ccg/lexicon.py:154) calls itself once per nested (, and augParseCategory (nltk/ccg/lexicon.py:228,242) recurses once per bracketed sub-category. Neither function tracks recursion depth nor checks sys.getrecursionlimit(), and the public entry point fromstring (nltk/ccg/lexicon.py:252, also re-exported via nltk.ccg.chart.fromstring) applies no length or nesting cap before handing the text to the parser. Impact An application that parses an untrusted lexicon string aborts with an unhandled RecursionError, terminating the affected parse operation or request worker (denial of service, CWE-674). The recursion is pure Python, so CPython raises a catchable RecursionError rather than crashing the process; there is no memory-corruption or code-execution primitive. Confidentiality and integrity are unaffected. Plausibly, a service that does not wrap the parse in a handler will surface the error to the caller and drop the in-flight request. Attack Chain 1. The application calls nltk.ccg.lexicon.fromstring(lexstr) with attacker-supplied text such as ":- S\nw => " + "("…

Assessment

CVSS
5.3 (v3.1)
Severity
Medium
Known exploited
Not listed in CISA KEV
Exploit availability
Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
Published
19 November 2026
Last updated
19 November 2026
Affected
nltk
Weakness
CWE-674

CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

At the source

References

Community proofs of concept

No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.

Submit a proof of concept
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-129224