CVE-2026-30241
Subscription Query Depth Bypass in Mercurius Causes DoS
Publication date: 2026-03-06
Last updated on: 2026-03-12
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| mercurius_project | mercurius | to 16.8.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-863 | The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in Mercurius, a GraphQL adapter for Fastify, in versions prior to 16.8.0. Mercurius fails to enforce the configured queryDepth limit on GraphQL subscription queries received over WebSocket connections. While the depth limit is correctly applied to HTTP queries and mutations, subscription queries bypass this check when sent over WebSocket. This allows a remote client to submit subscription queries with arbitrarily deep nesting, ignoring the intended depth restrictions.
On schemas that include recursive types, this can cause a denial of service (DoS) because each subscription event triggers exponential data resolution, overwhelming the system.
This issue was fixed in Mercurius version 16.8.0.
How can this vulnerability impact me? :
The primary impact of this vulnerability is the potential for denial of service (DoS) attacks. An attacker can send deeply nested subscription queries over WebSocket connections that bypass the depth limit, causing the server to perform excessive and exponential data resolution.
This can degrade the performance of the affected system, potentially making it unavailable to legitimate users.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade Mercurius to version 16.8.0 or later, where the issue has been patched.