Unchecked Input for Loop Condition Affecting nltk package, versions [,3.10.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.27% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-NLTK-19639020
  • published7 Sept 2026
  • disclosed27 Aug 2026
  • creditJoshgunAbdullayev

Introduced: 27 Aug 2026

NewCVE-2026-81724  (opens in a new tab)
CWE-606  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.10.3 or higher.

Overview

nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

Affected versions of this package are vulnerable to Unchecked Input for Loop Condition via the FeatStructReader in nltk/featstruct.py. An attacker can trigger an unhandled RecursionError and crash parsing code by supplying a deeply nested feature-structure string to FeatStruct(s), FeatStructReader().fromstring(s), or FeatureGrammar.fromstring(s). The parser’s mutually recursive value-reading path has no nesting-depth limit, so each additional nested [...], {...}, or (...) pushes another Python stack frame until the interpreter’s recursion limit is exceeded. Applications that accept untrusted feature-structure or feature-grammar text can be taken down with a small crafted input, causing denial of service.

CVSS Base Scores

version 4.0
version 3.1