CVE-2026-40324
Received Received - Intake
Stack Overflow in Hot Chocolate Parser Causes Process Crash

Publication date: 2026-04-18

Last updated on: 2026-04-18

Assigner: GitHub, Inc.

Description
Hot Chocolate is an open-source GraphQL server. Prior to versions 12.22.7, 13.9.16, 14.3.1, and 15.1.14, Hot Chocolate's recursive descent parser `Utf8GraphQLParser` has no recursion depth limit. A crafted GraphQL document with deeply nested selection sets, object values, list values, or list types can trigger a `StackOverflowException` on payloads as small as 40 KB. Because `StackOverflowException` is uncatchable in .NET (since .NET 2.0), the entire worker process is terminated immediately. All in-flight HTTP requests, background `IHostedService` tasks, and open WebSocket subscriptions on that worker are dropped. The orchestrator (Kubernetes, IIS, etc.) must restart the process. This occurs before any validation rules run β€” `MaxExecutionDepth`, complexity analyzers, persisted query allow-lists, and custom `IDocumentValidatorRule` implementations cannot intercept the crash because `Utf8GraphQLParser.Parse` is invoked before validation. The `MaxAllowedFields=2048` limit does not help because the crashing payloads contain very few fields. The fix in versions 12.22.7, 13.9.16, 14.3.1, and 15.1.14 adds a `MaxAllowedRecursionDepth` option to `ParserOptions` with a safe default, and enforces it across all recursive parser methods (`ParseSelectionSet`, `ParseValueLiteral`, `ParseObject`, `ParseList`, `ParseTypeReference`, etc.). When the limit is exceeded, a catchable `SyntaxException` is thrown instead of overflowing the stack. There is no application-level workaround. `StackOverflowException` cannot be caught in .NET. The only mitigation is to upgrade to a patched version. Operators can reduce (but not eliminate) risk by limiting HTTP request body size at the reverse proxy or load balancer layer, though the smallest crashing payload (40 KB) is well below most default body size limits and is highly compressible (~few hundred bytes via gzip).
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-18
Last Modified
2026-04-18
Generated
2026-05-07
AI Q&A
2026-04-18
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
hot_chocolate hot_chocolate to 15.1.14 (exc)
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 Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in Hot Chocolate, an open-source GraphQL server, specifically in its recursive descent parser called Utf8GraphQLParser. Prior to certain fixed versions, the parser had no limit on recursion depth. An attacker can craft a GraphQL document with deeply nested structures that triggers a StackOverflowException due to excessive recursion.

Because StackOverflowException is uncatchable in .NET, the entire worker process running the server crashes immediately. This causes all ongoing HTTP requests, background tasks, and WebSocket subscriptions on that worker to be dropped. The process must then be restarted by the orchestrator (like Kubernetes or IIS).

This crash happens before any validation rules run, so common protections like MaxExecutionDepth or complexity analyzers cannot prevent it. The fix involves adding a maximum allowed recursion depth option that throws a catchable SyntaxException instead of crashing.


How can this vulnerability impact me? :

The vulnerability can cause denial of service by crashing the entire worker process handling GraphQL requests. This results in dropped HTTP requests, interrupted background services, and lost WebSocket connections.

Since the crash is immediate and uncatchable, it can disrupt availability of the application or service using Hot Chocolate, potentially causing downtime until the process is restarted.

There is no application-level workaround; the only effective mitigation is upgrading to a patched version. Operators can reduce risk by limiting HTTP request body size at the proxy or load balancer, but the smallest crashing payload is only about 40 KB, which is below many default limits.


What immediate steps should I take to mitigate this vulnerability?

The only effective mitigation is to upgrade Hot Chocolate to a patched version: 12.22.7, 13.9.16, 14.3.1, or 15.1.14 or later.

Operators can reduce but not eliminate risk by limiting HTTP request body size at the reverse proxy or load balancer layer, although the smallest crashing payload is about 40 KB, which is below most default body size limits.

There is no application-level workaround because the StackOverflowException cannot be caught in .NET.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability causes a StackOverflowException that immediately terminates the worker process handling GraphQL requests, resulting in dropped in-flight HTTP requests, background tasks, and open WebSocket subscriptions. This abrupt termination can lead to denial of service and potential disruption of availability.

While the CVE description does not explicitly mention compliance with standards such as GDPR or HIPAA, the impact on service availability and potential loss of in-flight data could affect compliance with regulations that require data availability and integrity.

There is no application-level workaround; only upgrading to a patched version mitigates the risk. Operators can reduce risk by limiting HTTP request body size, but this is not a complete solution.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

There is no specific detection method or commands provided to identify this vulnerability on your network or system.

The vulnerability causes a StackOverflowException in the Hot Chocolate GraphQL server when processing deeply nested GraphQL documents, which results in the immediate termination of the worker process.

Because the crash occurs before any validation rules run, traditional GraphQL validation or complexity analyzers cannot detect the issue.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart