Skip to content

← Public intelligence

npm package

mercurius

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Low, CVSS 2.7npmAmendedPublished

    Mercurius's queryDepth limit bypassed for WebSocket subscriptions

    CVE-2026-30241 · GHSA-m4h2-mjfm-mp55

    Affected
    • npm mercurius < 16.8.0
    Fixed in
    16.8.0· Vendor fix available
    Issue
    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. Workarounds Disable subscriptions and, in general, queries over the WebSocket.

    Recommended action: Upgrade to 16.8.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 5.4npmAmendedPublished

    Mercurius: Incorrect Content-Type parsing can lead to CSRF attack

    CVE-2025-64166 · GHSA-v66j-6wwf-jc57

    Affected
    • npm mercurius <= 16.3.0
    Fixed in
    16.4.0· Vendor fix available
    Issue
    A Cross-Site Request Forgery (CSRF) vulnerability was identified in Mercurius versions 16. The issue arises from incorrect parsing of the Content-Type header in requests. Specifically, requests with Content-Type values such as application/x-www-form-urlencoded, multipart/form-data, or text/plain could be misinterpreted as application/json. This misinterpretation bypasses the preflight checks performed by the fetch() API, potentially allowing unauthorized actions to be performed on behalf of an authenticated user. --- Impact An attacker could exploit this vulnerability by crafting a malicious request with a Content-Type that Fastify incorrectly parses as application/json. When such a request is made from a different origin, it bypasses the Cross-Origin Resource Sharing (CORS) protections, leading to a potential CSRF attack. This could result in unauthorized actions being performed on behalf of an authenticated user without their consent. --- Proof of Concept In the above…

    Recommended action: Upgrade to 16.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.3npmAmendedPublished

    mercurius has Uncaught Exception when using subscriptions

    CVE-2023-22477 · GHSA-cm8h-q92v-xcfc

    Affected
    • npm mercurius >= 9.0.0, < 11.5.0; < 8.13.2
    Fixed in
    8.13.211.5.0· Vendor fix available
    Issue
    Impact Any users of Mercurius until version v11.5.0 are subjected to a denial of service attack by sending a malformed packet over WebSocket to /graphql. Patches This was patched in https://github.com/mercurius-js/mercurius/pull/940. The patch was released as v11.5.0 and v8.13.2. Workarounds Disable subscriptions. References Reported publicly as https://github.com/mercurius-js/mercurius/issues/939. The same problem was solved in https://github.com/fastify/fastify-websocket/pull/228

    Recommended action: Upgrade to 11.5.0 or 8.13.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 7.5npmAmendedPublished

    Uncaught Exception in mercurius

    CVE-2021-43801 · GHSA-273r-rm8g-7f3x

    Affected
    • npm mercurius >= 8.10.0, < 8.11.2
    Fixed in
    8.11.2· Vendor fix available
    Issue
    Impact Any users from Mercurius@8.10.0 to 8.11.1 are subjected to a denial of service attack by sending a malformed JSON to /graphql unless they are using a custom error handler. Patches The vulnerability has been fixed in https://github.com/mercurius-js/mercurius/pull/678 and shipped as v8.11.2. Workarounds Use a custom error handler. References See https://github.com/mercurius-js/mercurius/issues/677 For more information If you have any questions or comments about this advisory: Open an issue in https://github.com/mercurius-js/mercurius Email us at hello@matteocollina.com

    Recommended action: Upgrade to 8.11.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →