CVE-2026-30241 Mercurius: queryDepth limit bypassed for WebSocket subscriptions
Remote attackers can bypass query depth limits on WebSocket subscriptions, causing denial of service via resource exhaustion.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-30241?
CVE-2026-30241 is a low-severity missing authorization vulnerability in mercurius-js mercurius, published on 6 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-863
Which versions are affected by CVE-2026-30241?
2 open source packages ship an affected version, including mercurius. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mercurius npm | All versions | 16.8.0 |
mercurius npm | All versions | 16.8.0 |
Products include Mercurius Project Mercurius.
How do I fix CVE-2026-30241?
Upgrade mercurius to 16.8.0 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2026-30241 being exploited?
There is no known exploitation of CVE-2026-30241 in the wild and no public exploit code.
Other vulnerabilities in mercurius-js mercurius
Sources
Also known as GHSA-m4h2-mjfm-mp55.