home / blog

2026-11-22 · medium

CVE-2026-129225: Infinite recursion vulnerability in NLTK

CVE-2026-129225: NLTK vulnerable to infinite recursion, causing RecursionError on attacker inputs.

CVE-2026-129225: Infinite recursion vulnerability in NLTK

CVE-2026-129225 is a vulnerability in NLTK (Natural Language Toolkit) versions 3.10.3 and earlier. The DependencyGraph._tree, triples, and get_cycle_path methods have an infinite recursion issue that can be exploited through attacker-controlled input in CoNLL or Malt-TAB format, causing a RecursionError that aborts the parsing worker.

Severity is rated as medium with CVSS score 5.3. The vulnerability is confirmed on NVD and has been reported on GitHub where it's demonstrated how a 2000-link chain can cause the recursion error. The issue has been fixed in NLTK version 3.10.4.

For defense, it is recommended to immediately update to NLTK version 3.10.4. If updating is not possible, a custom recursive depth limit can be implemented in the affected methods. Verify project dependencies to identify NLTK usage and ensure all instances are properly patched.

At a glance

What
Infinite recursion vulnerability in NLTK (versions 3.10.3 and earlier) in the DependencyGraph._tree, triples, and get_cycle_path methods
Severity
Medium (CVSS 5.3)
Affected versions
NLTK 3.10.3 and earlier
Fix
Update to NLTK 3.10.4
Status
Confirmed
Action
Apply patch or update to version 3.10.4

Sources: NVD, CVE-2026-129225

← All articles