CVE-2023-22477 Mercurius is vulnerable to denial of service (DoS) when using subscriptions
Attackers can cause denial of service in Mercurius GraphQL adapter by sending malformed WebSocket packets to the subscription endpoint.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-22477?
CVE-2023-22477 is a medium-severity denial of service vulnerability in mercurius-js mercurius, published on 9 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Mercurius is a GraphQL adapter for Fastify. Any users of Mercurius until version 10.5.0 are subjected to a denial of service attack by sending a malformed packet over WebSocket to `/graphql`. This issue was patched in #940. As a workaround, users can disable subscriptions.
Weakness: CWE-248
Which versions are affected by CVE-2023-22477?
4 open source packages ship an affected version, including mercurius. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mercurius npm | All versions | 8.13.2 |
mercurius npm | All versions | 8.13.2 |
mercurius npm | From 9.0.0 | 11.5.0 |
mercurius npm | From 9.0.0 | 11.5.0 |
Products include Mercurius Project Mercurius.
How do I fix CVE-2023-22477?
Upgrade mercurius to a fixed version for your release line: 8.13.2 or 11.5.0.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2023-22477 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22477 exists.
Other vulnerabilities in mercurius-js mercurius
Sources
Also known as GHSA-cm8h-q92v-xcfc.