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

[Snyk] Upgrade: ms, debug, glob, https-proxy-agent, socks-proxy-agent, stack-utils, ws #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

organich
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade multiple dependencies.

👯‍♂ The following dependencies are linked and will therefore be updated together.

ℹ️ 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.

Name Versions Released on

ms
from 2.1.2 to 2.1.3 | 1 version ahead of your current version | 4 years ago
on 2020-12-08
debug
from 4.3.4 to 4.3.6 | 2 versions ahead of your current version | 2 months ago
on 2024-07-27
glob
from 7.2.0 to 7.2.3 | 2 versions ahead of your current version | 2 years ago
on 2022-05-15
https-proxy-agent
from 5.0.0 to 5.0.1 | 1 version ahead of your current version | 2 years ago
on 2022-04-14
socks-proxy-agent
from 6.1.1 to 6.2.1 | 4 versions ahead of your current version | 2 years ago
on 2022-05-31
stack-utils
from 2.0.5 to 2.0.6 | 1 version ahead of your current version | 2 years ago
on 2022-11-08
ws
from 8.4.2 to 8.18.0 | 20 versions ahead of your current version | 2 months ago
on 2024-07-03

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: ms
  • 2.1.3 - 2020-12-08

    Patches

    • Rename zeit to vercel: #151
    • Bump eslint from 4.12.1 to 4.18.2: #122
    • Add prettier as a dev dependency: #135 #153
    • Use GitHub Actions CI: #154

    Credits

    Huge thanks to @ getsnoopy for helping!

  • 2.1.2 - 2019-06-06

    Patches

    • Fixed negative decimals less than -10 don't work: #111
    • Support error in case of Infinity: #116
    • Update regexp for 10-.5 is invalid input: #117
    • Update chat badge: #119

    Credits

    Huge thanks to @ yuler and @ 7ma7X for helping!

from ms GitHub release notes
Package name: debug from debug GitHub release notes
Package name: glob from glob GitHub release notes
Package name: https-proxy-agent
  • 5.0.1 - 2022-04-14
  • 5.0.0 - 2020-02-07
from https-proxy-agent GitHub release notes
Package name: socks-proxy-agent
  • 6.2.1 - 2022-05-31
  • 6.2.0 - 2022-04-17
  • 6.2.0-beta.1 - 2022-02-15
  • 6.2.0-beta.0 - 2022-02-12
  • 6.1.1 - 2021-11-22
from socks-proxy-agent GitHub release notes
Package name: stack-utils from stack-utils GitHub release notes
Package name: ws
  • 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

    Features

    • Added the autoPong option (01ba54e).
  • 8.15.1 - 2023-12-12

    Notable changes

    • The allowMultipleEventsPerMicrotask option has been renamed to
      allowSynchronousEvents (4ed7fe5).

    This is a breaking change in a patch release that could have been avoided with
    an alias, but the renamed option was added only 3 days ago, so hopefully it
    hasn't already been widely used.

  • 8.15.0 - 2023-12-09

    Features

    • Added the allowMultipleEventsPerMicrotask option (93e3552).
  • 8.14.2 - 2023-09-19

    Bug fixes

    • Fixed an issue that allowed errors thrown by failed assertions to be
      swallowed when running tests (7f4e1a7).
  • 8.14.1 - 2023-09-08
  • 8.14.0 - 2023-09-06
  • 8.13.0 - 2023-03-10
  • 8.12.1 - 2023-02-13
  • 8.12.0 - 2023-01-07
  • 8.11.0 - 2022-11-06
  • 8.10.0 - 2022-10-24
  • 8.9.0 - 2022-09-22
  • 8.8.1 - 2022-07-15
  • 8.8.0 - 2022-06-09
  • 8.7.0 - 2022-05-26
  • 8.6.0 - 2022-05-01
  • 8.5.0 - 2022-02-07
  • 8.4.2 - 2022-01-14
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 has created this PR to upgrade:
  - ms from 2.1.2 to 2.1.3.
    See this package in npm: https://www.npmjs.com/package/ms
  - debug from 4.3.4 to 4.3.6.
    See this package in npm: https://www.npmjs.com/package/debug
  - glob from 7.2.0 to 7.2.3.
    See this package in npm: https://www.npmjs.com/package/glob
  - https-proxy-agent from 5.0.0 to 5.0.1.
    See this package in npm: https://www.npmjs.com/package/https-proxy-agent
  - socks-proxy-agent from 6.1.1 to 6.2.1.
    See this package in npm: https://www.npmjs.com/package/socks-proxy-agent
  - stack-utils from 2.0.5 to 2.0.6.
    See this package in npm: https://www.npmjs.com/package/stack-utils
  - ws from 8.4.2 to 8.18.0.
    See this package in npm: https://www.npmjs.com/package/ws

See this project in Snyk:
https://app.snyk.io/org/organich/project/6d2eaff3-7ec2-4770-8f59-4e962245bce9?utm_source=github&utm_medium=referral&page=upgrade-pr
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