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: axios, discord-protos, electron-store, express, node-fetch, socket.io, ws #31

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

Conversation

neznaamey
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

axios
from 1.1.3 to 1.7.7 | 38 versions ahead of your current version | 21 days ago
on 2024-08-31
discord-protos
from 1.0.4 to 1.0.5 | 1 version ahead of your current version | a year ago
on 2023-08-15
electron-store
from 8.1.0 to 8.2.0 | 1 version ahead of your current version | 6 months ago
on 2024-03-08
express
from 4.18.2 to 4.19.2 | 4 versions ahead of your current version | 6 months ago
on 2024-03-25
node-fetch
from 2.6.9 to 2.7.0 | 5 versions ahead of your current version | a year ago
on 2023-08-23
socket.io
from 4.6.2 to 4.7.5 | 6 versions ahead of your current version | 6 months ago
on 2024-03-14
ws
from 8.13.0 to 8.18.0 | 9 versions ahead of your current version | 3 months ago
on 2024-07-03

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Prototype Pollution
SNYK-JS-AXIOS-6144788
586 No Known Exploit
high severity Improper Input Validation
SNYK-JS-FOLLOWREDIRECTS-6141137
586 Proof of Concept
high severity Cross-site Request Forgery (CSRF)
SNYK-JS-AXIOS-6032459
586 Proof of Concept
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-AXIOS-6124857
586 Proof of Concept
medium severity Open Redirect
SNYK-JS-EXPRESS-6474509
586 No Known Exploit
medium severity Information Exposure
SNYK-JS-FOLLOWREDIRECTS-6444610
586 Proof of Concept
Release notes
Package name: axios from axios GitHub release notes
Package name: electron-store from electron-store GitHub release notes
Package name: express from express GitHub release notes
Package name: node-fetch from node-fetch GitHub release notes
Package name: socket.io
  • 4.7.5 - 2024-03-14
  • 4.7.4 - 2024-01-12
  • 4.7.3 - 2024-01-03
  • 4.7.2 - 2023-08-02
  • 4.7.1 - 2023-06-28
  • 4.7.0 - 2023-06-22
  • 4.6.2 - 2023-05-31
from socket.io 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 - ...

Snyk has created this PR to upgrade:
  - axios from 1.1.3 to 1.7.7.
    See this package in npm: https://www.npmjs.com/package/axios
  - discord-protos from 1.0.4 to 1.0.5.
    See this package in npm: https://www.npmjs.com/package/discord-protos
  - electron-store from 8.1.0 to 8.2.0.
    See this package in npm: https://www.npmjs.com/package/electron-store
  - express from 4.18.2 to 4.19.2.
    See this package in npm: https://www.npmjs.com/package/express
  - node-fetch from 2.6.9 to 2.7.0.
    See this package in npm: https://www.npmjs.com/package/node-fetch
  - socket.io from 4.6.2 to 4.7.5.
    See this package in npm: https://www.npmjs.com/package/socket.io
  - ws from 8.13.0 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/tommomo3/project/52632fe6-2d59-4e88-ac7b-4a32d7fc2b21?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.

"socket hang up" / ECONNRESET on consecutive requests with Node.js 19 and Node.js 20
2 participants