NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars — GHSA-FF5C-CP5C-9WJF
GitHub · GitHub · GHSA-FF5C-CP5C-9WJF
ID
GHSA-FF5C-CP5C-9WJF
GHSA-FF5C-CP5C-9WJF
Date
Source
GitHub
GitHub
Vendor
GitHub
GitHub
Threat
medium
medium
CVSS
6.9
6.9
Summary
`nltk.parse.RecursiveDescentParser` (and `SteppingRecursiveDescentParser`) enumerate parses top-down with no bound on the number of recursive steps. A small, crafted context-free grammar makes a short input consume unbounded CPU (and/or exhaust the Python recursion stack), pinning a process indefinitely — a denial of service. ## Proof of concept Both of the following hang on a 24-token input (killed after 8s;…
Timeline
- Published by source
- 2026-09-02
Risk context
- Reported severity or threat level: medium.
- Reported CVSS score: 6.9 out of 10.
- Review exposure for the affected product or family: pip: nltk.
Product
pip: nltk
What to do
General, cautious steps (verify details in the official source):
- Review exposure and plan remediation based on risk and environment.
- Identify affected product versions in your inventory and verify whether you are impacted.
- Apply vendor patches/updates or recommended mitigations as soon as available.
- Read the official advisory for exact affected versions and remediation steps.
Official advisory
Evidence and provenance
- Canonical advisory ID
- GHSA-FF5C-CP5C-9WJF
- Source
- GitHub
- Vendor
- GitHub
- Published by source
- 2026-09-02
- Last source activity
- 2026-09-02
- Additional identifiers
- CVE-2026-12876
- Curated by
- hlukh.ch
Related advisories and connections
These advisories are connected by shared CVE, product, vendor, source, or time signals.