CVE-2026-40324

CVE-2026-40324 is a critical-severity security vulnerability in HotChocolate.Language (nuget), affecting versions < 12.22.7. It is fixed in 12.22.7, 13.9.16, 14.3.1, 15.1.14.

Summary

Workarounds

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).

References

Impact

Hot Chocolate's Utf8GraphQLParser is a recursive descent parser with 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 existing MaxAllowedFields=2048 limit does not help because the crashing payloads contain very few fields.

Severity: Critical (9.1), CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

CVE-2026-40324 has a CVSS score of 9.1 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (12.22.7, 13.9.16, 14.3.1, 15.1.14); upgrading removes the vulnerable code path.

Affected versions

HotChocolate.Language (< 12.22.7) HotChocolate.Language (>= 13.0.0, < 13.9.16) HotChocolate.Language (>= 14.0.0, < 14.3.1) HotChocolate.Language (>= 15.0.0, < 15.1.14)

Security releases

HotChocolate.Language → 12.22.7 (nuget) HotChocolate.Language → 13.9.16 (nuget) HotChocolate.Language → 14.3.1 (nuget) HotChocolate.Language → 15.1.14 (nuget)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

  • v12 line: Fixed in 12.22.7
  • v13 line: Fixed in 13.9.16
  • v14 line: Fixed in 14.3.1
  • v15 line: Fixed in 15.1.14

The fix 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.

Frequently Asked Questions

  1. What is CVE-2026-40324? CVE-2026-40324 is a critical-severity security vulnerability in HotChocolate.Language (nuget), affecting versions < 12.22.7. It is fixed in 12.22.7, 13.9.16, 14.3.1, 15.1.14.
  2. How severe is CVE-2026-40324? CVE-2026-40324 has a CVSS score of 9.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of HotChocolate.Language are affected by CVE-2026-40324? HotChocolate.Language (nuget) versions < 12.22.7 is affected.
  4. Is there a fix for CVE-2026-40324? Yes. CVE-2026-40324 is fixed in 12.22.7, 13.9.16, 14.3.1, 15.1.14. Upgrade to this version or later.
  5. Is CVE-2026-40324 exploitable, and should I be worried? Whether CVE-2026-40324 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-40324 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-40324?
    • Upgrade HotChocolate.Language to 12.22.7 or later
    • Upgrade HotChocolate.Language to 13.9.16 or later
    • Upgrade HotChocolate.Language to 14.3.1 or later
    • Upgrade HotChocolate.Language to 15.1.14 or later

Other vulnerabilities in HotChocolate.Language

Stop the waste.
Protect your environment with Kodem.