CVE-2026-40324
Stack Overflow in Hot Chocolate Parser Causes Process Crash
Publication date: 2026-04-18
Last updated on: 2026-04-18
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| hot_chocolate | hot_chocolate | to 15.1.14 (exc) |
Helpful Resources
Exploitability
| 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.