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.
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m4h2-mjfm-mp55 Mercurius's queryDepth limit bypassed for WebSocket subscriptions
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Fri, 06 Mar 2026 21:30:00 +0000

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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-06T21:15:33.433Z

Reserved: 2026-03-04T17:23:59.799Z

Link: CVE-2026-30241

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-03-06T22:16:01.587

Modified: 2026-03-06T22:16:01.587

Link: CVE-2026-30241

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses