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 socket.io from 4.4.1 to 4.8.1 #117

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

Conversation

X-oss-byte
Copy link
Owner

@X-oss-byte X-oss-byte commented Nov 15, 2024

snyk-top-banner

Snyk has created this PR to upgrade socket.io from 4.4.1 to 4.8.1.

ℹ️ 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 17 versions ahead of your current version.

  • The recommended version was released on 22 days ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Denial of Service (DoS)
SNYK-JS-SOCKETIOPARSER-5596892
375 No Known Exploit
high severity Denial of Service (DoS)
SNYK-JS-WS-7266574
375 Proof of Concept
high severity Denial of Service (DoS)
SNYK-JS-ENGINEIO-3136336
375 No Known Exploit
high severity Uncaught Exception
SNYK-JS-ENGINEIO-5496331
375 No Known Exploit
high severity Uncaught Exception
SNYK-JS-SOCKETIO-7278048
375 No Known Exploit
Release notes
Package name: socket.io
  • 4.8.1 - 2024-10-25

    Bug Fixes

    • bundle: do not mangle the "_placeholder" attribute (ca9e994)

    Dependencies

  • 4.8.0 - 2024-09-21

    Features

    Custom transport implementations

    The transports option now accepts an array of transport implementations:

    import { io } from "socket.io-client";
    import { XHR, WebSocket } from "engine.io-client";

    const socket = io({
    transports: [XHR, WebSocket]
    });

    Here is the list of provided implementations:

    Transport Description
    Fetch HTTP long-polling based on the built-in fetch() method.
    NodeXHR HTTP long-polling based on the XMLHttpRequest object provided by the xmlhttprequest-ssl package.
    XHR HTTP long-polling based on the built-in XMLHttpRequest object.
    NodeWebSocket WebSocket transport based on the WebSocket object provided by the ws package.
    WebSocket WebSocket transport based on the built-in WebSocket object.
    WebTransport WebTransport transport based on the built-in WebTransport object.

    Usage:

    Transport browser Node.js Deno Bun
    Fetch ✅ (1)
    NodeXHR
    XHR
    NodeWebSocket
    WebSocket ✅ (2)
    WebTransport

    (1) since v18.0.0
    (2) since v21.0.0

    Added in f4d898e and b11763b.

    Test each low-level transports

    When setting the tryAllTransports option to true, if the first transport (usually, HTTP long-polling) fails, then the other transports will be tested too:

    import { io } from "socket.io-client";

    const socket = io({
    tryAllTransports: true
    });

    This feature is useful in two cases:

    • when HTTP long-polling is disabled on the server, or if CORS fails
    • when WebSocket is tested first (with transports: ["websocket", "polling"])

    The only potential downside is that the connection attempt could take more time in case of failure, as there have been reports of WebSocket connection errors taking several seconds before being detected (that's one reason for using HTTP long-polling first). That's why the option defaults to false for now.

    Added in 579b243.

    Bug Fixes

    • accept string | undefined as init argument (bis) (60c757f)
    • allow to manually stop the reconnection loop (13c6d2e)
    • close the engine upon decoding exception (04c8dd9)
    • do not send a packet on an expired connection (#5134) (8adcfbf)

    Dependencies

  • 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
  • 4.6.1 - 2023-02-20
  • 4.6.0 - 2023-02-07
  • 4.6.0-alpha1 - 2023-01-25
  • 4.5.4 - 2022-11-22
  • 4.5.3 - 2022-10-15
  • 4.5.2 - 2022-09-02
  • 4.5.1 - 2022-05-17
  • 4.5.0 - 2022-04-23
  • 4.4.1 - 2022-01-06
from socket.io 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:

Summary by Sourcery

Upgrade socket.io from version 4.4.1 to 4.8.1 to address security vulnerabilities and introduce new features such as custom transport implementations.

New Features:

  • Support for custom transport implementations in socket.io, allowing the 'transports' option to accept an array of transport implementations.

Bug Fixes:

  • Fix issues related to denial of service and uncaught exceptions in socket.io by upgrading to version 4.8.1.

Snyk has created this PR to upgrade socket.io from 4.4.1 to 4.8.1.

See this package in npm:
socket.io

See this project in Snyk:
https://app.snyk.io/org/sammytezzy/project/baae60b0-b551-4edb-bcb1-55eb7c12e4a6?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

stackblitz bot commented Nov 15, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

sourcery-ai bot commented Nov 15, 2024

Reviewer's Guide by Sourcery

This PR upgrades socket.io from version 4.4.1 to 4.8.1 to address multiple high-severity security vulnerabilities. The upgrade spans 17 versions and includes several bug fixes, new features, and security patches.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Dependency version upgrade to address security vulnerabilities
  • Fixed Denial of Service (DoS) vulnerability in socket.io-parser
  • Fixed Denial of Service (DoS) vulnerability in WS package
  • Fixed Denial of Service (DoS) vulnerability in engine.io
  • Fixed Uncaught Exception vulnerability in engine.io
  • Fixed Uncaught Exception vulnerability in socket.io
examples/express-session-example/package.json
New features and improvements in socket.io 4.8.x
  • Added support for custom transport implementations
  • Added tryAllTransports option for testing multiple low-level transports
  • Fixed bundle mangling of _placeholder attribute
  • Improved handling of expired connections
  • Enhanced reconnection loop control
examples/express-session-example/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

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