Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

[Security] Bump ws from 0.7.2 to 7.3.0 #33

Closed
wants to merge 1 commit into from

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps ws from 0.7.2 to 7.3.0. This update includes security fixes.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

Moderate severity vulnerability that affects ws A vulnerability was found in the ping functionality of the ws module before 1.0.0 which allowed clients to allocate memory by sending a ping frame. The ping functionality by default responds with a pong frame and the previously given payload of the ping frame. This is exactly what you expect, but internally ws always transforms all data that we need to send to a Buffer instance and that is where the vulnerability existed. ws didn't do any checks for the type of data it was sending. With buffers in node when you allocate it when a number instead of a string it will allocate the amount of bytes.

Affected versions: < 1.0.1

Sourced from The GitHub Security Advisory Database.

High severity vulnerability that affects ws ws is a "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455". By sending an overly long websocket payload to a ws server, it is possible to crash the node process. This affects ws 1.1.0 and earlier.

Affected versions: < 1.1.1

Sourced from The Node Security Working Group.

DoS due to excessively large websocket message ws is a "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455"

By sending an overly long websocket payload to a ws server, it is possible to crash the node process.

Affected versions: <=1.1.0

Sourced from The Node Security Working Group.

Remote Memory Disclosure UPDATE Jan 6, 2016

Some additional, important details have been made available by Stuart Larsen. The client (which could in fact be the server in certain instances) is that one that allocates and sends the memory that is then echo'd by the server.

A vulnerability was found in the ping functionality of the ws module which allowed clients to allocate memory by sending a ping frame. The ping functionality by default responds with a pong frame and the previously given payload of the ping frame.

This is exactly what you expect, but internally ws always transforms all data that we need to send to a Buffer instance and that is where the vulnerability existed. ws didn't do any checks for the type of data it was sending. With buffers in node when you allocate it when a number instead of a string it will allocate the amount of bytes.

var x = new Buffer(100);
// vs
var x = new Buffer('100');

This would allocate 100 bytes of memory in the first example and just 3 bytes with 100 as value in the second example. So the client would allocate 100 bytes of non-zeroed buffer and send that to the server.

Example POC

</tr></table> ... (truncated)

Affected versions: <= 1.0.0

Release notes

Sourced from ws's releases.

7.3.0

Features

  • WebSocket.prototype.addEventListener() now supports the once option (#1754).

7.2.5

Bug fixes

  • Fixed compatibility with Node.js master (651d6627).

7.2.4

Bug fixes

7.2.3

Bug fixes

  • WebSocket#{p{i,o}ng,close}() now thow an error if the data to send is too large to fit in a control frame (e54f08da).

7.2.2

Bug fixes

  • Fixed an issue where calling webSocketStream.end() could cause the process to crash (9535702e).
  • The connection is now closed if a non-masked frame is received on the server or a masked frame is received on the client (#1681).
  • The status code 1014 is now allowed to be used (#1682).

7.2.1

Bug fixes

  • Added bufferutil and utf-8-validate as peer dependencies (#1626).

7.2.0

Features

  • Added ability to specify the readableObjectMode option when using WebSocket.createWebSocketStream() (#1647).

7.1.2

Bug fixes

  • Fixed a bug that caused compress jobs to never be marked as complete (#1618).

7.1.1

Bug fixes

... (truncated)
Commits
  • 41f5e4f [dist] 7.3.0
  • 2e5c01f [feature] Make addEventListener() support the once option (#1754)
  • 97ddfce [ci] Test on node 14
  • 2b49c48 Revert "[ci] Use GitHub Actions (#1644)"
  • 82f0537 Revert "[ci] Test on node 14"
  • b167d1c Revert "[ci] Update Coveralls GitHub Action to version 1.1.1"
  • 78e1c01 [ci] Update Coveralls GitHub Action to version 1.1.1
  • e694979 [doc] Fix badge URL
  • 67983cb [dist] 7.2.5
  • 18d773d [test] Fix failing tests
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by lpinca, a new releaser for ws since your current version.


Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [ws](https://github.com/websockets/ws) from 0.7.2 to 7.3.0. **This update includes security fixes.**
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@0.7.2...7.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability labels May 12, 2020
@dependabot-preview
Copy link
Contributor Author

Superseded by #36.

@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/ws-7.3.0 branch July 7, 2020 03:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants