CVE-2026-30241

Mercurius: queryDepth limit bypassed for WebSocket subscriptions

Published Mar 6, 2026 CVSS 4.0 · 2.7 Low EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-m4h2-mjfm-mp55 Mercurius's queryDepth limit bypassed for WebSocket subscriptions
History
Type Values Removed Values Added
First Time appeared Mercurius Project
Mercurius Project mercurius
CPEs cpe:2.3:a:mercurius_project:mercurius:*:*:*:*:*:node.js:*:*
Vendors & Products Mercurius Project
Mercurius Project mercurius
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mercurius-js
Mercurius-js mercurius
Vendors & Products Mercurius-js
Mercurius-js mercurius
Type Values Removed Values Added
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.
Title Mercurius: queryDepth limit bypassed for WebSocket subscriptions
Weaknesses CWE-863
References
Metrics cvssV4_0

{'score': 2.7, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 9, 2026, 8:54 PM
Reserved
Mar 4, 2026, 5:23 PM
Status
Analyzed
Published
Mar 6, 2026, 10:16 PM
Modified
Jun 17, 2026, 10:32 AM