Gptline: NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars (CVE-2026-12876)
The RecursiveDescentParser and SteppingRecursiveDescentParser components in NLTK can be exploited by crafted ambiguous or left-recursive grammars to cause unbounded CPU consumption or stack exhaustion, resulting in denial of service. This affects applications that parse grammars or inputs from untrusted sources. There is no impact on confidentiality or integrity, only on availability of the affected process. A patch is available to address this issue.
AI Analysis
Technical Summary
NLTK's RecursiveDescentParser and SteppingRecursiveDescentParser enumerate parses top-down without limiting recursive steps. Crafted context-free grammars with left recursion or ambiguity can cause the parser to consume unbounded CPU or exhaust the Python recursion stack, effectively hanging the process. The vulnerability allows denial of service by feeding a small payload that triggers unbounded recursion or exponential parse enumeration. This affects applications that run these parsers on untrusted grammars or inputs. No confidentiality or integrity impacts are reported. A sibling vulnerability (CVE-2026-12875) affects RegexpTokenizer but is separate.
Potential Impact
An attacker can cause a denial of service by supplying a crafted grammar or input that triggers unbounded recursion or exponential parsing in RecursiveDescentParser, leading to high CPU usage or stack exhaustion. This affects availability of the single process running the parser. There is no impact on confidentiality or integrity.
Mitigation Recommendations
A patch is available for this vulnerability. Users should update to a fixed version of the affected software to prevent denial of service via crafted grammars or inputs. Avoid running RecursiveDescentParser on grammars or inputs from untrusted sources until patched.
Gptline: NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars (CVE-2026-12876)
Description
The RecursiveDescentParser and SteppingRecursiveDescentParser components in NLTK can be exploited by crafted ambiguous or left-recursive grammars to cause unbounded CPU consumption or stack exhaustion, resulting in denial of service. This affects applications that parse grammars or inputs from untrusted sources. There is no impact on confidentiality or integrity, only on availability of the affected process. A patch is available to address this issue.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
NLTK's RecursiveDescentParser and SteppingRecursiveDescentParser enumerate parses top-down without limiting recursive steps. Crafted context-free grammars with left recursion or ambiguity can cause the parser to consume unbounded CPU or exhaust the Python recursion stack, effectively hanging the process. The vulnerability allows denial of service by feeding a small payload that triggers unbounded recursion or exponential parse enumeration. This affects applications that run these parsers on untrusted grammars or inputs. No confidentiality or integrity impacts are reported. A sibling vulnerability (CVE-2026-12875) affects RegexpTokenizer but is separate.
Potential Impact
An attacker can cause a denial of service by supplying a crafted grammar or input that triggers unbounded recursion or exponential parsing in RecursiveDescentParser, leading to high CPU usage or stack exhaustion. This affects availability of the single process running the parser. There is no impact on confidentiality or integrity.
Mitigation Recommendations
A patch is available for this vulnerability. Users should update to a fixed version of the affected software to prevent denial of service via crafted grammars or inputs. Avoid running RecursiveDescentParser on grammars or inputs from untrusted sources until patched.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-gptline-CVE-2026-12876
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6aac8e5c55bf5e2cf5491dc7
Added to database: 09/18/2026, 01:05:32 UTC
Last enriched: 09/18/2026, 01:51:57 UTC
Last updated: 09/18/2026, 02:06:50 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.