CVE-2026-81724 in NLTKinfo

Summary

by MITRE • 08/27/2026

NLTK before 3.10.3 contains an uncontrolled recursion vulnerability in nltk.featstruct.FeatStructReader that allows unauthenticated attackers to cause a denial of service by supplying deeply nested feature-structure input. Attackers can craft trivial payloads with nested brackets that exceed Python's recursion limit and raise an unhandled RecursionError, crashing applications that parse user-supplied feature structures or feature grammars.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 08/27/2026

The vulnerability identified in Natural Language Toolkit (NLTK) versions prior to 3.10.3 represents a critical security flaw within the nltk.featstruct.FeatStructReader component. This module is responsible for parsing and interpreting feature structures, which are commonly used in computational linguistics to represent complex linguistic data such as syntactic trees or semantic representations. The core issue stems from an uncontrolled recursion mechanism inherent in how the parser handles nested input sequences. When the reader processes a string containing deeply nested brackets, it invokes recursive function calls without implementing any depth limits or safeguards against excessive nesting levels. This architectural oversight allows attackers to craft trivial yet effective denial-of-service payloads by supplying inputs with bracket depths that exceed Python's default recursion limit.

From a technical perspective, this flaw is classified under CWE-674, which describes Uncontrolled Recursion in functions other than those related to file I/O operations. The vulnerability arises because the recursive descent parser does not validate the depth of nested structures before processing them. As the input string contains more levels of nesting, the call stack grows proportionally until it surpasses the system's allocated memory for recursion. This results in a RecursionError exception being raised by the Python interpreter. Since this error is unhandled within the parsing routine, it propagates up the application stack, causing the entire process or thread to crash abruptly rather than gracefully handling the malformed input.

The operational impact of this vulnerability is significant for any application that relies on NLTK to parse user-supplied feature structures or feature grammars. Because the parser does not require authentication, unauthenticated remote attackers can exploit this flaw simply by submitting maliciously crafted text inputs through APIs, web forms, or command-line interfaces that feed data into the FeatStructReader. The resulting denial of service disrupts availability for legitimate users and can lead to increased system resource consumption as crashed processes may need to be restarted depending on the deployment architecture. In high-throughput environments such as natural language processing pipelines or chatbot backends, this could cause widespread outages if not properly mitigated at the infrastructure level.

This vulnerability aligns with MITRE ATT&CK technique T1499, Endpoint Denial of Service, specifically under sub-techniques related to resource exhaustion via software vulnerabilities. The attack vector is straightforward and requires minimal effort from an adversary, making it a high-risk threat for systems exposed to untrusted input data that undergoes linguistic parsing. To mitigate this risk, organizations must upgrade NLTK to version 3.10.3 or later where the recursion depth has been controlled. Additionally, defensive coding practices such as implementing custom exception handlers around FeatStructReader calls can prevent application crashes by catching RecursionError exceptions and returning appropriate error responses instead of allowing the process to terminate unexpectedly. Input validation strategies that limit string length or nesting complexity prior to parsing also serve as effective compensating controls for legacy systems where immediate patching is not feasible.

Responsible

VulnCheck

Reservation

08/27/2026

Disclosure

08/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!