CVE-2026-129224
Awaiting Analysis Awaiting Analysis - Queue

NLTK CCG Lexicon Parser RecursionError via Excessive Nesting

Vulnerability report for CVE-2026-129224, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-19

Last updated on: 2026-11-19

Assigner: GitHub, Inc.

Description

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, the CCG lexicon parser's matchBrackets and augParseCategory functions recursively process nested parenthesized categories without a depth bound. An attacker-controlled lexicon string with excessive nesting can raise RecursionError through nltk.ccg.lexicon.fromstring and terminate the parse operation or request worker. This issue is fixed in version 3.10.4.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-19
Last Modified
2026-11-19
Generated
2026-11-20
AI Q&A
2026-11-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nltk nltk 3.10.4

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an uncontrolled recursion issue in NLTK's CCG lexicon parser. The matchBrackets and augParseCategory functions recursively process nested parenthesized categories without a depth limit. Attacker-controlled input with excessive nesting triggers a RecursionError, causing the application to crash or terminate worker processes, leading to a denial of service.

Detection Guidance

To detect this vulnerability, monitor for RecursionError exceptions in applications using NLTK versions prior to 3.10.4. Check logs for stack overflow errors during CCG lexicon parsing. Use Python scripts to test inputs with deep nesting, e.g., strings with 2000+ nested parentheses, and observe if the parser crashes.

Impact Analysis

The impact is primarily on availability. An attacker can send maliciously crafted input with deep nesting to crash the parser or worker processes, disrupting normal application functionality. This does not lead to data breaches or code execution but can cause service outages.

Mitigation Strategies

Upgrade NLTK to version 3.10.4 or later to apply the recursion depth limit fix. If upgrading is not possible, implement a custom depth limit in matchBrackets and augParseCategory functions by adding checks against MAX_PARSE_DEPTH (default 500). Validate all lexicon inputs for excessive nesting before processing.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-129224. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...