chore(deps): Bump ws from 8.18.1 to 8.21.0
Bumps ws from 8.18.1 to 8.21.0.
Release notes
Sourced from ws's releases.
8.21.0
Features
- Introduced the
maxBufferedChunksandmaxFragmentsoptions (2b2abd45).Bug fixes
- Fixed a remote memory exhaustion DoS vulnerability (2b2abd45).
A high volume of tiny fragments and data chunks could be sent by a peer, using modest network traffic, to crash a
wsserver or client due to OOM.import { WebSocket, WebSocketServer } from 'ws';const wss = new WebSocketServer({ port: 0 }, function () { const data = Buffer.alloc(1); const options = { fin: false }; const { port } = wss.address(); const ws = new WebSocket(
ws://localhost:${port});ws.on('open', function () { (function send() { ws.send(data, options, function (err) { if (err) return; send(); }); })(); });
ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(
client close - code: ${code} reason: ${reason.toString()}); }); });
wss.on('connection', function (ws) { ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(server close - code: ${code} reason: ${reason.toString()}); }); });The vulnerability was responsibly disclosed and fixed by Nadav Magier.
In vulnerable versions, the issue can be mitigated by lowering the value of the
maxPayloadoption if possible.8.20.1
... (truncated)
Commits
bca91ad[dist] 8.21.02b2abd4[security] Limit retained message parts78eabe2[security] Add latest vulnerability to SECURITY.md5d9b316[dist] 8.20.1c0327ec[security] Fix uninitialized memory disclosure inwebsocket.close()ce2a3d6[ci] Test on node 2658e45b8[ci] Do not test on node 255f26c24[ci] Run the lint step on node 248439255[dist] 8.20.0d3503c1[minor] Export thePerMessageDeflateclass and header utils- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Summary by cubic
Upgrade ws to 8.21.0 to fix a memory exhaustion DoS and add new backpressure options (maxBufferedChunks, maxFragments). Updated backend/package.json, package-lock.json, and pnpm-lock.yaml; no app code changes.