Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mercurius
  4. ›
  5. CVE-2026-30241

CVE-2026-30241: Mercurius's queryDepth limit bypassed for WebSocket subscriptions

March 6, 2026 (updated March 9, 2026)

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.

References

  • github.com/advisories/GHSA-m4h2-mjfm-mp55
  • github.com/mercurius-js/mercurius
  • github.com/mercurius-js/mercurius/commit/5b56f60f4b0d60780b0ff499a479bd830bdd6986
  • github.com/mercurius-js/mercurius/security/advisories/GHSA-m4h2-mjfm-mp55
  • nvd.nist.gov/vuln/detail/CVE-2026-30241

Code Behaviors & Features

Detect and mitigate CVE-2026-30241 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 16.8.0

Fixed versions

  • 16.8.0

Solution

Upgrade to version 16.8.0 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

npm/mercurius/CVE-2026-30241.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 26 Mar 2026 00:17:59 +0000.