Skip to content
Heist/ feed
Back to feed
Low

Mercurius: queryDepth limit bypassed for WebSocket subscriptions

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-30241
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:02 UTC · Revision 1

Source evidence

Mercurius: queryDepth limit bypassed for WebSocket subscriptions

core-osv · Original source

Published 6 Mar 2026, 21:15 UTC

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.

osv:CVE-2026-30241
Complete source record
{
  "id": "dde55eda7ca76435e8a97e795a6b76ec9bc2fe92d005916ccd022930018e7d12",
  "url": "https://osv.dev/vulnerability/CVE-2026-30241",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Mercurius: queryDepth limit bypassed for WebSocket subscriptions",
    "summary": "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.",
    "evidence": "osv:CVE-2026-30241",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2026-30241",
      "aliases": [
        "CVE-2026-30241",
        "GHSA-m4h2-mjfm-mp55"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mercurius-js/mercurius",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0e16af4fe2ba1a18d1e1193a94146feb794ddee0"
                },
                {
                  "fixed": "5b56f60f4b0d60780b0ff499a479bd830bdd6986"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:mercurius_project:mercurius:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "16.8.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5b56f60f4b0d60780b0ff499a479bd830bdd6986"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v16.7.0",
            "v16.6.0",
            "v16.5.0",
            "v16.4.0",
            "v16.3.0",
            "v16.2.0",
            "v16.1.0",
            "v16.0.1",
            "v16.0.0",
            "v15.1.0",
            "v15.0.0",
            "v14.1.0",
            "v14.0.0",
            "v13.4.1",
            "v13.4.0",
            "v13.3.3",
            "v13.3.2",
            "v13.3.1",
            "v13.3.0",
            "v13.2.2",
            "v13.2.1",
            "v13.2.0",
            "v13.1.0",
            "13.0.0",
            "v12.2.0",
            "v12.1.0",
            "v12.0.1",
            "v12.0.0",
            "v11.5.0",
            "v11.4.0",
            "v11.3.0",
            "v11.2.0",
            "v11.1.0",
            "v11.0.1",
            "v11.0.0",
            "v10.5.1",
            "v10.5.0",
            "v10.4.0",
            "v10.3.0",
            "v10.2.0",
            "v10.1.1",
            "v10.1.0",
            "v10.0.0",
            "v9.8.0",
            "v9.7.0",
            "v9.5.0",
            "v9.4.0",
            "v9.3.6",
            "v9.3.5",
            "v9.3.4",
            "v9.3.3",
            "v9.3.2",
            "v9.3.1",
            "v9.3.0",
            "v9.2.0",
            "v9.1.0",
            "v9.0.0",
            "v8.5.0",
            "v8.4.2",
            "v8.4.1",
            "v8.4.0",
            "v8.3.0",
            "v8.2.1",
            "v8.2.0",
            "v8.1.3",
            "8.1.2",
            "v8.1.1",
            "v8.1.0",
            "v8.0.0",
            "v7.9.1",
            "v7.9.0",
            "v7.8.0",
            "v7.7.0",
            "v7.6.1",
            "v7.6.0",
            "v7.5.0",
            "v7.4.0",
            "v7.3.3",
            "v7.3.2",
            "v7.3.1",
            "v7.3.0",
            "v7.2.0",
            "v7.1.0",
            "v7.0.0",
            "v6.12.0",
            "v6.11.0",
            "v6.10.1",
            "v6.10.0",
            "v6.9.1",
            "v6.9.0",
            "v6.8.0",
            "v6.7.0",
            "v6.6.0",
            "v6.4.0",
            "v6.3.0",
            "v6.2.0",
            "v6.1.1",
            "v6.1.0",
            "v6.0.0",
            "v5.8.2",
            "v5.8.1",
            "v5.8.0",
            "v5.7.0",
            "v5.6.0",
            "v5.5.0",
            "v5.4.0",
            "v5.3.4",
            "v5.3.3",
            "v5.3.2",
            "v5.3.1",
            "v5.3.0",
            "v5.2.0",
            "v5.1.2",
            "v5.1.1",
            "v5.1.0",
            "v5.0.1",
            "v5.0.0",
            "v4.3.0",
            "v4.2.0",
            "v4.1.0",
            "v4.0.0",
            "v3.9.0",
            "v3.8.0",
            "v3.7.0",
            "v3.6.0",
            "v3.4.0",
            "v3.3.0",
            "v3.2.0",
            "v3.1.0",
            "v3.0.7",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.2.0",
            "v2.1.0",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "untagged-320a6f59c58f12bd5bea",
            "v2.0.0",
            "v1.5.0",
            "v1.4.0",
            "v1.3.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.0",
            "v0.8.0",
            "v0.7.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-30241.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.111676705Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/30xxx/CVE-2026-30241.json",
        "https://github.com/mercurius-js/mercurius/security/advisories/GHSA-m4h2-mjfm-mp55",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-30241",
        "https://github.com/mercurius-js/mercurius/commit/5b56f60f4b0d60780b0ff499a479bd830bdd6986"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-863"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/30xxx/CVE-2026-30241.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-30241",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508872,
  "published_at": "2026-03-06T21:15:33.433+00:00"
}