Back to list

NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input — GHSA-CW6X-M8JW-QMRH

GitHub · GitHub · GHSA-CW6X-M8JW-QMRH

ID
GHSA-CW6X-M8JW-QMRH
Date
Source
GitHub
Vendor
GitHub
Threat
medium
CVSS
6.9
EPSS
0.00267

Summary

### Summary `nltk.featstruct.FeatStructReader` (used by `FeatStruct(str)` and by `FeatureGrammar.fromstring()`) parses feature-structure strings such as `[a=1]` with a recursive-descent parser that has no nesting-depth limit. A small, trivially-crafted input (~700 bytes) with deeply nested brackets drives the parser past Python's recursion limit and raises an **unhandled `RecursionError`** instead of the library's…

Timeline

Published by source
2026-09-02

Risk context

  • Reported severity or threat level: medium.
  • Reported CVSS score: 6.9 out of 10.
  • Reported EPSS value: 0.00267.
  • 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-CW6X-M8JW-QMRH
Source
GitHub
Vendor
GitHub
Published by source
2026-09-02
Last source activity
2026-09-02
Additional identifiers
CVE-2026-81724
Curated by
hlukh.ch

Related advisories and connections

These advisories are connected by shared CVE, product, vendor, source, or time signals.