All vulnerabilities

PyPI

CVE-2026-129228

NLTK: Uncontrolled recursion in Toolbox settings helpers causes denial of service via deeply nested input

Severity
Medium 5.3
Published
19 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.5% in the next 30 daysHigher than 45% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled recursion (CWE-674)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-f2h2-f4fc-p978
Sources
OSV.dev and GitHub

Description

The Toolbox settings-tree helpers recurse over the parsed element tree without any depth bound. _to_settings_string (nltk/toolbox.py:418), remove_blanks (nltk/toolbox.py:432), add_default_fields (nltk/toolbox.py:451), _sort_fields (nltk/toolbox.py:484), and add_blank_lines (nltk/toolbox.py:502,516) each recurse once per element level with no depth counter or explicit stack. The producer ToolboxSettings.parse builds the element tree iteratively, so nesting depth is driven entirely by attacker-supplied +marker / -marker pairs.

An application that parses an untrusted Toolbox settings file and then serialises or transforms it through any of the public helper functions aborts with an unhandled RecursionError, terminating the affected operation or request worker (denial of service, CWE-674). The recursion is pure Python, yielding a catchable RecursionError rather than memory corruption or code execution. Confidentiality and integrity are unaffected.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • Every version before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References