Uncontrolled Recursion Affecting nltk package, versions [,3.10.4)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.52% (38th 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 Learn

Learn about Uncontrolled Recursion vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-NLTK-22733188
  • published22 Nov 2026
  • disclosed19 Nov 2026
  • creditDaniel Coles, manus-use

Introduced: 19 Nov 2026

NewCVE-2026-129226  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.10.4 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 Uncontrolled Recursion via uncontrolled recursion in the read_type function (nltk/sem/logic.py), which parses <a,b> complex type strings by recursing on both halves of each nesting level with no depth or length bound. The LogicParser.MAX_PARSE_DEPTH guard protects the expression parser but is never applied to the read_type path, which is reached directly by the public Type.fromstring classmethod and by Expression.typecheck when processing signature strings. An attacker who can supply a deeply nested type string (e.g. "<" * n + "e,e" + ">" * n) causes an unhandled RecursionError that terminates the affected operation or request worker.

CVSS Base Scores

version 4.0
version 3.1