{"items":[{"id":"NVI-00014040","kind":"vulnerability","title":"NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-ff5c-cp5c-9wjf","CVE-2026-12876"],"plain_summary":"GitHub lists this reviewed advisory for nltk. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-36fbeb550d26599306d4cdf72b8950c5"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-36fbeb550d26599306d4cdf72b8950c5","url":"https://github.com/advisories/GHSA-ff5c-cp5c-9wjf","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-ff5c-cp5c-9wjf","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T02:21:43.711Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-36fbeb550d26599306d4cdf72b8950c5"],"technology":"nltk","known_exclusions":[],"conditions_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.\n\n## Proof of concept\n\nBoth of the following hang on a 24-token input (killed after 8s; growth is super-linear in input length), on NLTK develop:\n\n```python\nfrom nltk import CFG\nfrom nltk.parse import RecursiveDescentParser\n\n# (a) left recursion -> unbounded recursion\ng = CFG.fromstring(\"S -> S S | 'a'\")\nlist(RecursiveDescentParser(g).parse([\"a\"] * 24))   # hangs\n\n# (b) ambiguous grammar -> exponential number of parses\ng = CFG.fromstring(\"S -> 'a' S | 'a' S S | 'a'\")\nlist(RecursiveDescentParser(g).parse([\"a\"] * 24))   # hangs\n```\n\n## Impact\n\nAn application that runs `RecursiveDescentParser` on a grammar (or an input) drawn from an untrusted source can be driven into an unbounded CPU / stack-exhaustion loop by a tiny payload. No confidentiality or integrity impact; single-process availability only.\n\n## Sibling\n\nThe RegexpTokenizer ReDoS reported alongside this (","public_affected_ranges":["<= 3.10.2"]}],"null_published_at":"2026-11-02T10:00:37.199Z","source_updated_at":"2026-09-02T14:33:39.000Z","source_disclosed_at":"2026-09-02T14:33:38.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-02T02:21:43.711Z"}],"next_cursor":null,"snapshot_revision":"42594"}