[dist] Update dependency ws to v6 [SECURITY] #1671
Open
+5
−21
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:
^3.0.0->^6.0.0GitHub Vulnerability Alerts
CVE-2021-32640
Impact
A specially crafted value of the
Sec-Websocket-Protocolheader can be used to significantly slow down a ws server.Proof of concept
Patches
The vulnerability was fixed in [email protected] (websockets/ws@00c425e) and backported to [email protected] (websockets/ws@78c676d) and [email protected] (websockets/ws@76d47c1).
Workarounds
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 themaxHeaderSizeoptions.Credits
The vulnerability was responsibly disclosed along with a fix in private by Robert McLaughlin from University of California, Santa Barbara.
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)
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).v5.2.4Compare Source
Bug fixes
e55e510to the 5.x release line (4abd8f6).v5.2.3Compare Source
Bug fixes
00c425eto the 5.x release line (76d47c1).v5.2.2Compare Source
Bug fixes
6046a28(8aba871).v5.2.1Compare Source
Bug fixes
certain circumstances (
6046a28).v5.2.0Compare Source
Features
v5.1.1Compare Source
Bug fixes
9e152f9(#1347).v5.1.0Compare Source
Features
addressargument of theWebSocketconstructor can now be aURLinstance (#1329).
optionsargument of theWebSocketconstructor now accepts any TLSoption that is also accepted by
https.request()(#1332).v5.0.0Compare Source
Breaking changes
the client's requested subprotocols (#1312).
net.Socketerrors are no longer re-emitted (a4050db).Features
(#1302).
v4.1.0Compare Source
Features
WebSocketServer.prototype.address()(#1294).zlib{Deflate,Inflate}Optionsoptions (#1306).v4.0.0Compare Source
Breaking changes
no status code (
a31b1f6).695c5ea).onerrorevent handler now receives anErrorEventinstead of JavaScripterror (
63e275e).WebSocket.prototype.ping()andWebSocket.prototype.pong()is no longer a boolean but an optional callback(
30c9f71).protocolVersionandbytesReceivedattributes have beenremoved (
30c9f71...ee9b5f3).extensionsattribute is no longer an object but a string representingthe extensions selected by the server (
fdec524).'headers'event on the client has been renamed to'upgrade'. Listenersof this event now receive only the
responseargument (1c783c2).WebSocket.prototype.pause()andWebSocket.prototype.resume()methodshave been removed to prevent the user from interfering with the state of the
underlying
net.Socketstream (a206e98).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 was generated by Mend Renovate. View the repository job log.