Vulnerability · Published Mar 6, 2026 · Assigned by GitHub_M
CVE-2026-30241Mercurius: queryDepth limit bypassed for WebSocket subscriptions
Low 2.7
In plain English
A low-severity incorrect authorization in mercurius from mercurius-js. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Mercurius is a GraphQL adapter for Fastify. Prior to version 16.8.0, Mercurius fails to enforce the configured queryDepth limit on GraphQL subscription queries received over WebSocket connections. The depth check is correctly applied to HTTP queries and mutations, but subscription queries are parsed and executed without invoking the depth validation. This allows a remote client to submit arbitrarily deeply nested subscription queries over WebSocket, bypassing the intended depth restriction. On schemas with recursive types, this can lead to denial of service through exponential data resolution on each subscription event. This issue has been patched in version 16.8.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | mercurius | 16.8.0 | GHSA-m4h2-mjfm-mp55 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| mercurius-js | mercurius | < 16.8.0 |
Weakness: CWE-863 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:U