Update dependency ws to v7 [SECURITY]#15
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
e65afa7 to
21ba204
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^1.0.1→^7.4.6Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
ReDoS in Sec-Websocket-Protocol header
CVE-2021-32640 / GHSA-6fc8-4gx4-v693
More information
Details
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 ws@7.4.6 (websockets/ws@00c425e) and backported to ws@6.2.2 (websockets/ws@78c676d) and ws@5.2.3 (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.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
websockets/ws (ws)
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).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).v3.3.3Compare Source
Bug fixes
net.Socketerrors are no longer swallowed (beff620).received (
beff620).v3.3.2Compare Source
Bug fixes
Sec-WebSocket-Extensionsheader has been rewritten to makeit spec-compliant (#1240).
v3.3.1Compare Source
Bug fixes
c4fe466).A specially crafted value of the
Sec-WebSocket-Extensionsheader thatused
Object.prototypeproperty names as extension or parameter namescould be used to make a ws server crash.
The vulnerability has been privately reported by Nick Starke and
Ryan Knell of Sonatype Security Research and promptly fixed. Please
update now!
v3.3.0Compare Source
Features
ecdhCurveoption (#1228).v3.2.0Compare Source
Features
v3.1.0Compare Source
Features
Bug fixes
CloseEvent#wasCleanwas incorrectly set tofalseforclose codes in the 3000-4999 range (#1146).
v3.0.0Compare Source
Breaking changes
upgradeReqproperty (#1099).flagsargument from the'message','ping', and'pong'events (#1101).
(#1107).
v2.3.1Compare Source
Bug fixes
WebSocket.prototype.close()from workingproperly when called from a listener of the
headersevent (732aaf0).v2.3.0Compare Source
Features
WebSocketclient now emits aheadersevent (#1082).v2.2.3Compare Source
Notable changes
Bug fixes
optionsargument to be reassigned whenprotocolswasnull(20bd7c7).v2.2.2Compare Source
Bug fixes
v2.2.1Compare Source
Bug fixes
WebSocket.prototype.terminate()now closes the connection immediately evenif the other peer fails to work properly (#1033).
v2.2.0Compare Source
Features
binaryTypeattribute (#1018).Bug fixes
5edb460).v2.1.0Compare Source
Features
060b275).Bug fixes
synchronously on the socket while parsing data (
6695bd4).v2.0.3Compare Source
Bug fixes
thousands of frames (#992).
f043b52).v2.0.2Compare Source
Notable changes
bufferutil@2andutf-8-validate@3(466e210).v2.0.1Compare Source
Bug fixes
d856dcb).v2.0.0Compare Source
Breaking changes
newoperator is now required to create all instances as we moved to ES6classes.
clientsproperty of theWebSocketServeris no longer anArraybut aSetand is only set if theclientTrackingoption is truthy (#806).41e7cae).WebSocketServerswhen binding them to the same underlying HTTP/s server (#885).
WebSocket.prototype.stream()and ability to pass a readable streamto
WebSocket.prototype.send()(#875).handleProtocolshandler (#890).supportsproperty fromWebSocket(#918).WebSocket.createServer(),WebSocket.createConnection(), andWebSocket.connect()factory functions (#926).WebSocket.prototype.ping()andWebSocket.prototype.pong()is no longer an options object but a boolean(#951).
WebSocket.prototype.close()is called before theconnection is established (#956).
The following breaking changes only apply if you required the mentioned classes
directly.
Senderinheritance fromEventEmitter(#861).BufferPoolclass (73ab370).extensionsa required argument for theReceiverconstructor (5f53194).receiver.onbinaryandreceiver.ontexthave been merged intoreceiver.onmessage(#939).Features
WebSocketServer(#795).checkServerIdentityoption toWebSocket(#701).thresholdoption for permessage-deflate to only compress messageswhose size is bigger than
threshold(6b3904b).shouldHandlemethod toWebSocketServerto see if a request shouldbe accepted or rejected. This method can be overridden by the user if a
custom logic is desired (
6472425).removeEventListenermethod toWebSocket(078e96a).familyoption toWebSocket(#962).Bug fixes
handled (#744).
errorevents are now emitted with a properErrorinstance (#789).b58f688).validation failed (#534).
finoption ofWebSocket.prototype.send()wasunconditionally set to
true(ea50be7).being correctly calculated (
545635d).zlib.flush()was called with a wrong flush level(#733).
WebSocketServer.prototype.close()is now invoked when thecloseevent is emitted by the underlying HTTP/s server (#892).with default settings (
dcdc652).connectionevent was emitted even if the clientclosed the connection during the handshake process (
04530ad).crypto.randomBytes()instead ofMath.random()(7253f06).discarded (#945).
clientsset (#955).
WebSocket.prototype.close()now works as expected if called on the clientbefore the connection is established (#956).
WebSocket.prototype.send()no longer mutates the options object (#968).bufferedAmountgetter now takes into account the data queued in thesender (#971).
v1.1.5Compare Source
Bug fixes
f8fdcd4).v1.1.4Compare Source
Notable changes
fac50ac).v1.1.3Compare Source
Notable changes
bufferutil@>1andutf-8-validate@>2(b4cf110).v1.1.2Compare Source
Bug fixes
crypto.randomBytes()instead ofMath.random()(#994).c1f3b21).v1.1.1Compare Source
v1.1.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 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.