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

update: update dependency ws to v7.4.6 [security] - autoclosed #1700

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 1, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ws 7.4.5 -> 7.4.6 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

v7.4.6

Compare Source

Bug fixes

  • Fixed a ReDoS vulnerability (00c425e).

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

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);
}

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


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.


  • 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 force-pushed the update/npm-ws-vulnerability branch from b91dd15 to d18d9a8 Compare June 1, 2021 19:15
@renovate renovate bot changed the title update: update dependency ws to v7.4.6 [security] update: update dependency ws to v7.4.6 [security] - autoclosed Jun 1, 2021
@renovate renovate bot closed this Jun 1, 2021
@renovate renovate bot deleted the update/npm-ws-vulnerability branch June 1, 2021 21:01
@renovate renovate bot changed the title update: update dependency ws to v7.4.6 [security] - autoclosed update: update dependency ws to v7.4.6 [security] Jun 2, 2021
@renovate renovate bot reopened this Jun 2, 2021
@renovate renovate bot restored the update/npm-ws-vulnerability branch June 2, 2021 05:15
@renovate renovate bot force-pushed the update/npm-ws-vulnerability branch from d18d9a8 to cfc3189 Compare June 2, 2021 05:16
@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #1700 (c9d3c07) into master (55d23cd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1700   +/-   ##
=======================================
  Coverage   63.58%   63.58%           
=======================================
  Files         155      155           
  Lines        2977     2977           
  Branches      250      250           
=======================================
  Hits         1893     1893           
  Misses       1041     1041           
  Partials       43       43           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55d23cd...c9d3c07. Read the comment docs.

@renovate renovate bot force-pushed the update/npm-ws-vulnerability branch 5 times, most recently from 6606923 to e687833 Compare June 3, 2021 20:55
@renovate renovate bot force-pushed the update/npm-ws-vulnerability branch from e687833 to c9d3c07 Compare June 4, 2021 16:27
@codeclimate
Copy link

codeclimate bot commented Jun 4, 2021

Code Climate has analyzed commit c9d3c07 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (95% is the threshold).

This pull request will bring the total coverage in the repository to 64.9% (0.0% change).

View more on Code Climate.

@renovate renovate bot changed the title update: update dependency ws to v7.4.6 [security] update: update dependency ws to v7.4.6 [security] - autoclosed Jun 8, 2021
@renovate renovate bot closed this Jun 8, 2021
@renovate renovate bot deleted the update/npm-ws-vulnerability branch June 8, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant