Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-58qx-3vcg-4xpx

Опубликовано: 18 мая 2026
Источник: github
Github: Прошло ревью
CVSS3: 4.4

Описание

ws: Uninitialized memory disclosure

Impact

The websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument.

Proof of concept

import { deepStrictEqual } from 'node:assert'; import { WebSocket, WebSocketServer } from 'ws'; const wss = new WebSocketServer( { port: 0, skipUTF8Validation: true }, function () { const { port } = wss.address(); const ws = new WebSocket(`ws://localhost:${port}`, { skipUTF8Validation: true }); ws.on('close', function (code, reason) { deepStrictEqual(reason, Buffer.alloc(80)); }); } ); wss.on('connection', function (ws) { ws.close(1000, new Float32Array(20)); });

Patches

The vulnerability was fixed in ws@8.20.1 (https://github.com/websockets/ws/commit/c0327ec15a54d701eb6ccefaa8bef328cfc03086).

Credits

Credit for the private and responsible disclosure of this issue goes to Nikita Skovoroda.

Remarks

Although the calculated CVSS severity is medium, the actual severity is believed to be low, as the flaw is only exploitable through misuse that is unlikely in practice.

Resources

Пакеты

Наименование

ws

npm
Затронутые версииВерсия исправления

>= 8.0.0, < 8.20.1

8.20.1

EPSS

Процентиль: 51%
0.00745
Низкий

4.4 Medium

CVSS3

Дефекты

CWE-908

Связанные уязвимости

CVSS3: 4.4
ubuntu
3 месяца назад

ws is an open source WebSocket client and server for Node.js. Prior to 8.20.1, the websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument. This vulnerability is fixed in 8.20.1.

CVSS3: 7.5
redhat
3 месяца назад

ws is an open source WebSocket client and server for Node.js. Prior to 8.20.1, the websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument. This vulnerability is fixed in 8.20.1.

CVSS3: 4.4
nvd
3 месяца назад

ws is an open source WebSocket client and server for Node.js. Prior to 8.20.1, the websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument. This vulnerability is fixed in 8.20.1.

msrc
2 месяца назад

ws: Uninitialized memory disclosure

CVSS3: 4.4
debian
3 месяца назад

ws is an open source WebSocket client and server for Node.js. Prior to ...

EPSS

Процентиль: 51%
0.00745
Низкий

4.4 Medium

CVSS3

Дефекты

CWE-908