Hot Chocolate GraphQL server crash via stack overflow (CVE-2026-40324)
CVE-2026-40324
CVE-2026-40324 critical RCE lets unauthenticated attackers crash Hot Chocolate GraphQL servers with a 40KB query. Upgrade to 12.22.7+, 13.9.16+, 14.3.1+, or 15.1.14+.
Patch now - CVE-2026-40324 is a critical denial-of-service vulnerability in Hot Chocolate GraphQL servers prior to 12.22.7, 13.9.16, 14.3.1, or 15.1.14 that lets an unauthenticated attacker crash the entire application process with a small malicious query. Upgrade immediately to prevent persistent service disruption that bypasses all application-level protections.
Overview
A critical vulnerability in the Hot Chocolate GraphQL server allows an unauthenticated attacker to crash the entire application process with a relatively small, malicious query. The flaw is in the parser, which lacks a recursion depth limit, leading to an unrecoverable StackOverflowException. This causes immediate termination of the worker process.
Vulnerability Details
Identified as CVE-2026-40324 with a CVSS score of 9.1, this vulnerability affects Hot Chocolate versions prior to 12.22.7, 13.9.16, 14.3.1, and 15.1.14. The server’s Utf8GraphQLParser does not limit recursion when parsing deeply nested structures in a GraphQL document. A payload as small as 40 KB can trigger the crash.
The crash is severe because a StackOverflowException in .NET cannot be caught. It terminates the process instantly, dropping all in-flight HTTP requests, background tasks, and active WebSocket subscriptions. The process must then be restarted by its orchestrator, like Kubernetes or IIS. Crucially, this parser crash occurs before any GraphQL validation rules-including MaxExecutionDepth or custom security analyzers-can run, making existing application-level protections ineffective.
Impact
The primary impact is a persistent denial-of-service (DoS) condition. An attacker can repeatedly send a crafted query to crash application instances, leading to service disruption and instability. This can be done without authentication and with minimal network bandwidth, as the payload is small and compressible.
Remediation and Mitigation
The only complete remediation is to upgrade Hot Chocolate to a patched version: 12.22.7, 13.9.16, 14.3.1, or 15.1.14. These versions introduce a MaxAllowedRecursionDepth option in ParserOptions with a safe default, replacing the fatal stack overflow with a catchable SyntaxException.
There is no effective application-level workaround, as the crash is unrecoverable. As a partial mitigation, operators can configure reverse proxies or load balancers to limit HTTP request body sizes. However, this is not a reliable defense, as the smallest crashing payload is only 40 KB-well below typical default limits-and can be compressed to a few hundred bytes.
For more information on recent threats, visit our security news section.
Security Insight
This vulnerability highlights the critical importance of implementing recursion limits in parsers, a classic software security principle. It mirrors past incidents in other interpreters and compilers where unbounded recursion led to crashes. The fact that the crash bypasses all GraphQL validation layers underscores a common architectural flaw: placing security checks after a component that can itself be destabilized by malicious input.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Related Advisories
Uncontrolled Recursion vulnerability in Apache Thrift Node.js bindings This issue affects Apache Thrift: before 0.23.0. Users are recommended to upgrade to version 0.23.0, which fixes the issue....
An OS Command Injection vulnerability in Ivanti Sentry before the R10.5.2, R10.6.2 and R10.7.1 versions allows a remote unauthenticated user to achieve root-level remote code execution...
Mirasvit Full Page Cache Warmer for Magento 2 before version 1.11.12 contains a PHP object injection vulnerability that allows unauthenticated attackers to achieve remote code execution by supplying a...
NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when the rewrite directive is followed by a rewrite, if, or set directive and an ...