Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-30241: CWE-863: Incorrect Authorization in mercurius-js mercurius

0
Low
VulnerabilityCVE-2026-30241cvecve-2026-30241cwe-863
Published: Fri Mar 06 2026 (03/06/2026, 21:15:33 UTC)
Source: CVE Database V5
Vendor/Project: mercurius-js
Product: mercurius

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.

AI-Powered Analysis

AILast updated: 03/06/2026, 21:45:55 UTC

Technical Analysis

Mercurius is a GraphQL adapter designed for the Fastify web framework, facilitating GraphQL APIs with support for queries, mutations, and subscriptions. Prior to version 16.8.0, mercurius failed to enforce the configured queryDepth limit on subscription queries received via WebSocket connections. The queryDepth limit is a security control intended to restrict the maximum depth of nested GraphQL queries to prevent resource exhaustion and potential denial of service. While mercurius correctly applied this limit to HTTP-based queries and mutations, subscription queries—long-lived connections that push data updates—were parsed and executed without invoking the depth validation logic. This discrepancy allows remote clients to submit arbitrarily deeply nested subscription queries over WebSocket, bypassing the intended depth restriction. On GraphQL schemas that include recursive types, such deeply nested subscription queries can cause exponential growth in data resolution workload for each subscription event, leading to denial of service by overwhelming server resources. The vulnerability is identified as CWE-863 (Incorrect Authorization), as the enforcement of query depth limits is effectively an authorization control that was not applied consistently. The issue requires no authentication or user interaction and can be exploited remotely. The vulnerability was assigned CVE-2026-30241 and has a CVSS 4.0 base score of 2.7 (low severity), reflecting limited impact and ease of exploitation but low overall risk. The flaw was patched in mercurius version 16.8.0 by ensuring the queryDepth limit is enforced uniformly across all query types, including subscriptions over WebSocket.

Potential Impact

The primary impact of this vulnerability is a denial of service condition caused by resource exhaustion on servers running vulnerable versions of mercurius with GraphQL subscriptions enabled over WebSocket. Attackers can craft deeply nested subscription queries that bypass depth limits, causing exponential data resolution and high CPU/memory consumption on each subscription event. This can degrade service availability, cause server crashes, or force restarts, impacting application uptime and user experience. While the vulnerability does not directly expose sensitive data or allow privilege escalation, the denial of service can disrupt business operations, especially for real-time applications relying on GraphQL subscriptions. Organizations with high traffic or complex recursive GraphQL schemas are at greater risk. The low CVSS score reflects that exploitation does not compromise confidentiality or integrity and requires specific conditions (use of subscriptions over WebSocket). No known exploits are reported in the wild, but the vulnerability could be leveraged in targeted denial of service attacks against affected services.

Mitigation Recommendations

To mitigate this vulnerability, organizations should upgrade mercurius to version 16.8.0 or later, where the issue is patched. If immediate upgrade is not feasible, consider disabling GraphQL subscriptions over WebSocket or restricting access to subscription endpoints via network controls or authentication to limit exposure. Implement additional rate limiting and query complexity analysis on subscription queries to detect and block unusually deep or complex queries. Review GraphQL schema design to minimize recursive types or deeply nested structures that could exacerbate resource consumption. Monitor server resource usage and logs for signs of abnormal subscription query patterns. Employ Web Application Firewalls (WAFs) or API gateways capable of enforcing query depth limits on WebSocket traffic. Finally, ensure that all GraphQL-related dependencies are kept up to date and that security patches are applied promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-04T17:23:59.799Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69ab479ac48b3f10ffdbff8b

Added to database: 3/6/2026, 9:31:06 PM

Last enriched: 3/6/2026, 9:45:55 PM

Last updated: 3/6/2026, 11:58:17 PM

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses