StellarFw / stellar

A modular action based Web Framework for Node.js
https://stellar-framework.com
MIT License
38 stars 4 forks source link

build(deps): [security] bump ws from 4.1.0 to 6.2.2 #251

Open dependabot-preview[bot] opened 3 years ago

dependabot-preview[bot] commented 3 years ago

Bumps ws from 4.1.0 to 6.2.2. This update includes security fixes.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

ReDoS in Sec-Websocket-Protocol header

Impact

A specially crafted value of the Sec-Websocket-Protocol header can be used to significantly slow down a ws server.

Proof of concept

for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
  const value = 'b' + ' '.repeat(length) + 'x';
  const start = process.hrtime.bigint();

value.trim().split(/ *, */);

const end = process.hrtime.bigint();

console.log('length = %d, time = %f ns', length, end - start); }

Patches

... (truncated)

Affected versions: < 6.2.2

Sourced from The GitHub Security Advisory Database.

ReDoS in Sec-Websocket-Protocol header

Impact

A specially crafted value of the Sec-Websocket-Protocol header can be used to significantly slow down a ws server.

Proof of concept

for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
  const value = 'b' + ' '.repeat(length) + 'x';
  const start = process.hrtime.bigint();

value.trim().split(/ *, */);

const end = process.hrtime.bigint();

console.log('length = %d, time = %f ns', length, end - start); }

Patches

... (truncated)

Affected versions: < 5.2.3

Release notes

Sourced from ws's releases.

6.2.2

Bug fixes

  • Backported 00c425ec to the 6.x release line (78c676d2).

6.2.1

Bug fixes

  • Fixed a bug that, under certain circumstances, prevented the close timer from being set (aa1dcd5).

6.2.0

Features

  • Added ability to follow redirects (#1490).

Bug fixes

  • The opening handshake is now aborted if the Sec-WebSocket-Key header field value is invalid (160af45b).

6.1.4

Bug fixes

  • Fixed an issue that caused the Host header to always include a port (#1510).

6.1.3

Bug fixes

  • Fixed a bug that, under certain circumstances, prevented the close frame from being parsed (#1494).

6.1.2

Bug fixes

  • Restored compatibility with Node.js < 6.13.0 (26436e0).

6.1.1

Bug fixes

  • Queued messages to send are now discarded if the permessage-deflate is enabled and the socket closes prematurely (#1464, #1471).

6.1.0

Features

  • The WebSocket server now emits a 'close' event when the server closes (#1453).

6.0.0

... (truncated)

Commits
  • 9bdb580 [dist] 6.2.2
  • 78c676d [security] Fix ReDoS vulnerability
  • d57db27 [dist] 6.2.1
  • 40734d8 [minor] Add missing option in JSDoc comment
  • 0556f31 [doc] Add TOC to ws.md (#1539)
  • aa1dcd5 [fix] Make WebSocket#close() set the close timer immediately
  • 297f56d [minor] Remove unneeded if statement
  • bcab373 [test] Increase code coverage
  • 3a5a20a Revert "[ci] Cache dependencies"
  • 9a89e5d [ci] Cache dependencies
  • Additional commits viewable in compare view


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](https://app.dependabot.com): - 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)