Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 5.3, published 27 August 2026.
- Which products and versions are affected?
- nltk (PyPI) <= 3.10.2.
- Is there a fix for This vulnerability?
- A patch was published on 2026-08-27: Fix available in NLTK 3.10.3 and later Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run nltk (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability exists in nltk.featstruct.FeatStructReader, a recursive-descent parser that processes feature-structure notation (e.g., [a=1]). The parser contains a recursive call cycle (FeatStructReader.read_partial → _read_partial_featdict → _read_value → read_value → read_fstruct_value → read_partial) with no nesting-depth limit or guard. When input contains deeply nested brackets, the recursion depth exceeds Python's built-in limit, raising an unhandled RecursionError—a subclass not caught by the parser's normal exception handlers (which expect ValueError). The same vulnerability affects FeatureGrammar.fromstring(), which uses the same parser for embedded feature structures. A proof-of-concept payload of 669 bytes with 167 levels of nesting crashes in under 2 milliseconds. Similar issues in other NLTK modules (logic.py, jsontags.py) were previously fixed by enforcing a MAX_*_DEPTH constant; featstruct.py lacked equivalent protection. The vulnerability is patched in NLTK 3.10.3 by adding recursion-depth checks.
Affected products
- NLTK Project NLTK <= 3.10.2
Timeline
- 2026-08-12: disclosed: Original advisory GHSA-cw6x-m8jw-qmrh published
- 2026-08-27: advisory: Duplicate advisory GHSA-pf76-q698-37v8 published
- 2026-08-27: patched: Fix available in NLTK 3.10.3 and later