Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency ws to v6 [security] - autoclosed #156

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 6, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ws ^5.2.2 -> ^6.0.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2021-32640

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

The vulnerability was fixed in [email protected] (websockets/ws@00c425e) and backported to [email protected] (websockets/ws@78c676d).

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=size and/or the maxHeaderSize options.

Credits

The vulnerability was responsibly disclosed along with a fix in private by Robert McLaughlin from University of California, Santa Barbara.

References


Release Notes

websockets/ws

v6.2.2

Compare Source

v6.2.1

Compare Source

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

v6.2.0

Compare Source

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 (160af45).

v6.1.4

Compare Source

Bug fixes

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

v6.1.3

Compare Source

Bug fixes

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

v6.1.2

Compare Source

Bug fixes

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

v6.1.1

Compare Source

Bug fixes

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

v6.1.0

Compare Source

Features

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

v6.0.0

Compare Source

Breaking changes

  • Dropped support for Node.js 4 (d73885c).
  • Added a shim that throws an error when used if the package is bundled for the
    browser (#​1345).
  • Added a maxPayload option on the client. Defaults to 100 MiB (#​1402).
  • Dropped support for the memLevel and level options. Use
    zlibDeflateOptions instead. (80e2002).

Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the chore label Jun 6, 2021
@renovate renovate bot changed the title fix(deps): update dependency ws to v6 [security] fix(deps): update dependency ws to v6 [security] - autoclosed Jun 16, 2021
@renovate renovate bot closed this Jun 16, 2021
@renovate renovate bot deleted the renovate/npm-ws-vulnerability branch June 16, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant