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

chore(deps): update dependency ws to v6.2.2 [security] #5250

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 28, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ws 6.2.1 -> 6.2.2 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

Bug fixes


Configuration

📅 Schedule: "" in timezone America/Los_Angeles.

🚦 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 force-pushed the renovate/npm-ws-vulnerability branch 4 times, most recently from f0fd805 to 204125e Compare June 1, 2021 20:31
@renovate renovate bot changed the title chore(deps): update dependency ws to v7 [security] chore(deps): update dependency ws to v7 [security] - autoclosed Jun 1, 2021
@renovate renovate bot closed this Jun 1, 2021
@renovate renovate bot deleted the renovate/npm-ws-vulnerability branch June 1, 2021 21:32
@renovate renovate bot changed the title chore(deps): update dependency ws to v7 [security] - autoclosed chore(deps): update dependency ws to v7 [security] Jun 2, 2021
@renovate renovate bot reopened this Jun 2, 2021
@renovate renovate bot restored the renovate/npm-ws-vulnerability branch June 2, 2021 03:18
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 204125e to b84566f Compare June 2, 2021 03:24
@renovate renovate bot changed the title chore(deps): update dependency ws to v7 [security] chore(deps): update dependency ws to v6.2.2 [security] Jun 2, 2021
@wbruno
Copy link

wbruno commented Jun 4, 2021

can we merge this PR?

@glasser
Copy link
Member

glasser commented Jun 7, 2021

We can merge it but I don't think it fixes the underlying issue that subscriptions-transport-ws has a dependency on ws v5 which is vulnerable.

All ws dependencies are removed in the under-active-development release-3.0 branch. I'm happy to review and merge and release a subscriptions-transport-ws PR that upgrades its dependency to something more modern but otherwise am focused on "drop this dependency entirely" instead of "figure out if it's OK to upgrade a dependency of an essentially unmaintained package (subscriptions-transport-ws)".

@glasser glasser merged commit a0df8d3 into main Jun 7, 2021
@glasser glasser deleted the renovate/npm-ws-vulnerability branch June 7, 2021 18:57
@glasser
Copy link
Member

glasser commented Jun 7, 2021

(Merged, but to be clear: this updates a dev dependency at the top level of the monorepo that gets installed when actively developing this repo, and has no effect on the published dependencies of any of the actual packages.)

@glasser
Copy link
Member

glasser commented Jun 8, 2021

You can now upgrade to [email protected] which has the security fix with no major version changes. Alternatively, you can upgrade to [email protected] which allows you to use ws 6 or 7; Apollo Server v2.25.1 updates all relevant dependencies.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants