chore(deps): update dependency ws to v7 [security] #285
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.2.4->7.5.10GitHub Vulnerability Alerts
CVE-2024-37890
Impact
A request with a number of headers exceeding the
server.maxHeadersCountthreshold could be used to crash a ws server.Proof of concept
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:
--max-http-header-size=sizeand/or themaxHeaderSizeoptions so that no more headers than theserver.maxHeadersCountlimit can be sent.server.maxHeadersCountto0so that no limit is applied.Credits
The vulnerability was reported by Ryan LaPointe in https://github.com/websockets/ws/issues/2230.
References
Release Notes
websockets/ws (ws)
v7.5.10Compare Source
Bug fixes
e55e510to the 7.x release line (22c2876).v7.5.9Compare Source
Bug fixes
bc8bd34to the 7.x release line (0435e6e).v7.5.8Compare Source
Bug fixes
0fdcc0ato the 7.x release line (2758ed3).d68ba9eto the 7.x release line (dc1781b).v7.5.7Compare Source
Bug fixes
6946f5fto the 7.x release line (1f72e2e).v7.5.6Compare Source
Bug fixes
b8186ddto the 7.x release line (73dec34).ed2b803to the 7.x release line (22a26af).v7.5.5Compare Source
Bug fixes
ec9377cto the 7.x release line (0e274ac).v7.5.4Compare Source
Bug fixes
6a72da3to the 7.x release line (76087fb).869c989to the 7.x release line (2799793).v7.5.3Compare Source
Bug fixes
WebSocketServerconstructor now throws an error if more than one of thenoServer,server, andportoptions are specefied (66e58d2).'close'event was emitted by aWebSocketServerbeforethe internal HTTP/S server was actually closed (
5a58730).WebSocketServer.prototype.close()was called (772236a).v7.5.2Compare Source
Bug fixes
Sec-WebSocket-Extensionsheader but no extension was requested or if theserver indicates an extension not requested by the client (
aca94c8).v7.5.1Compare Source
Bug fixes
error occurred simultaneously on both peers (
b434b9f).v7.5.0Compare Source
Features
codeproperty describing the specific type of errorthat has occurred (#1901).
Bug fixes
framing error) occurs (
8806aa9).connection is closed due to an error (
8806aa9).v7.4.6Compare Source
Bug fixes
00c425e).A specially crafted value of the
Sec-Websocket-Protocolheader could be usedto significantly slow down a ws server.
The vulnerability was responsibly disclosed along with a fix in private by
Robert McLaughlin from University of California, Santa Barbara.
In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the
--max-http-header-size=sizeand/or the
maxHeaderSizeoptions.v7.4.5Compare Source
Bug fixes
utf-8-validateis not installed(
23ba6b2).websocket.close()andwebsocket.terminate()didnot close the connection (
67e25ff).v7.4.4Compare Source
Bug fixes
permessage-deflate extension (
9277437).v7.4.3Compare Source
Bug fixes
takeover is disabled (#1840).
v7.4.2Compare Source
Bug fixes
a2c0d44).v7.4.1Compare Source
Bug fixes
'error'event bug in Node.js < 13 whichcaused an uncaught error during the WebSocket handshake (
38d6ab3).v7.4.0Compare Source
Features
WebSocketServer.prototype.handleUpgrade()now takes theclient HTTP GET request as second argument (
7d39f19).Bug fixes
eabed8f).CONNECTING,OPEN,CLOSING,CLOSED,binaryType,bufferedAmount,extensions,onclose,onerror,onmessage,onopen,protocol,readyState, andurlproperties are now enumerable (2069e68).v7.3.1Compare Source
Bug fixes
websocket.bufferedAmountaccuracy (e1349c0,a162942).v7.3.0Compare Source
Features
WebSocket.prototype.addEventListener()now supports theonceoption (#1754).v7.2.5Compare Source
Bug fixes
651d662).v7.2.3Compare Source
Bug fixes
WebSocket#{p{i,o}ng,close}()now thow an error if the data to send is toolarge to fit in a control frame (
e54f08d).v7.2.2Compare Source
Bug fixes
webSocketStream.end()could cause the processto crash (
9535702).or a masked frame is received on the client (#1681).
v7.2.1Compare Source
Bug fixes
bufferutilandutf-8-validateas peer dependencies (#1626).v7.2.0Compare Source
Features
readableObjectModeoption when usingWebSocket.createWebSocketStream()(#1647).v7.1.2Compare Source
Bug fixes
(#1618).
v7.1.1Compare Source
Bug fixes
WebSocketserver constructor is usedincorrectly (
3641266).v7.1.0Compare Source
Features
WebSocketin aDuplexstream (#1589).Bug fixes
ifstatement" (dbacf58, #1591).v7.0.1Compare Source
Bug fixes
v7.0.0Compare Source
Breaking changes
1e6999b).url.Urlinstances in theWebSocketconstructor(
692d7b4).WebSocket#{p{i,o}ng,send}()has changed when thereadyStateattribute is notOPEN(#1532)CONNECTING, an exception is thrown.CLOSINGorCLOSEDbufferedAmountattribute is increased by the length of thedataargument in bytes.
callbackfunction is called with an error.callbackfunction is not provided.v6.2.3Compare Source
Bug fixes
e55e510to the 6.x release line (eeb76d3).v6.2.2Compare Source
Bug fixes
00c425eto the 6.x release line (78c676d).v6.2.1Compare Source
Bug fixes
being set (
aa1dcd5).v6.2.0Compare Source
Features
Bug fixes
Sec-WebSocket-Keyheader fieldvalue is invalid (
160af45).v6.1.4Compare Source
Bug fixes
Hostheader to always include a port (#1510).v6.1.3Compare Source
Bug fixes
being parsed (#1494).
v6.1.2Compare Source
Bug fixes
26436e0).v6.1.1Compare Source
Bug fixes
and the socket closes prematurely (#1464, #1471).
v6.1.0Compare Source
Features
'close'event when the servercloses (#1453).
v6.0.0Compare Source
Breaking changes
d73885c).browser (#1345).
maxPayloadoption on the client. Defaults to 100 MiB (#1402).memLevelandleveloptions. UsezlibDeflateOptionsinstead. (80e2002).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.
This PR has been generated by Mend Renovate using a curated preset maintained by
. View repository job log here