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

🚨 [security] Update socket.io 4.5.2 → 4.8.1 (minor) #238

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

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Nov 1, 2024


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ socket.io (4.5.2 → 4.8.1) · Repo · Changelog

Security Advisories 🚨

🚨 socket.io has an unhandled 'error' event

Impact

A specially crafted Socket.IO packet can trigger an uncaught exception on the Socket.IO server, thus killing the Node.js process.

node:events:502
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. (undefined)
at new NodeError (node:internal/errors:405:5)
at Socket.emit (node:events:500:17)
at /myapp/node_modules/socket.io/lib/socket.js:531:14
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 'ERR_UNHANDLED_ERROR',
context: undefined
}

Affected versions

Version range Needs minor update?
4.6.2...latest Nothing to do
3.0.0...4.6.1 Please upgrade to [email protected] (at least)
2.3.0...2.5.0 Please upgrade to [email protected]

Patches

This issue is fixed by 15af22f, included in [email protected] (released in May 2023).

The fix was backported in the 2.x branch today: d30630b

Workarounds

As a workaround for the affected versions of the socket.io package, you can attach a listener for the "error" event:

io.on("connection", (socket) => {
  socket.on("error", () => {
    // ...
  });
});

For more information

If you have any questions or comments about this advisory:

  • Open a discussion here

Thanks a lot to Paul Taylor for the responsible disclosure.

References

Release Notes

4.7.5

More info than we can show here.

4.7.4

More info than we can show here.

4.7.3

More info than we can show here.

4.7.2

More info than we can show here.

4.7.1

More info than we can show here.

4.7.0

More info than we can show here.

4.6.2

More info than we can show here.

4.6.1

More info than we can show here.

4.6.0

More info than we can show here.

4.5.4

More info than we can show here.

4.5.3

More info than we can show here.

Does any of this look wrong? Please let us know.

↗️ @​types/cors (indirect, 2.8.12 → 2.8.17) · Repo

Sorry, we couldn't find anything useful about this release.

↗️ engine.io (indirect, 6.2.0 → 6.6.2) · Repo · Changelog

Security Advisories 🚨

🚨 engine.io Uncaught Exception vulnerability

Impact

A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process.

TypeError: Cannot read properties of undefined (reading 'handlesUpgrades')
    at Server.onWebSocket (build/server.js:515:67)

This impacts all the users of the engine.io package, including those who uses depending packages like socket.io.

Patches

A fix has been released today (2023/05/02): 6.4.2

This bug was introduced in version 5.1.0 and included in version 4.1.0 of the socket.io parent package. Older versions are not impacted.

For socket.io users:

Version range engine.io version Needs minor update?
[email protected] ~6.4.0 npm audit fix should be sufficient
[email protected] ~6.2.0 Please upgrade to [email protected]
[email protected] ~6.1.0 Please upgrade to [email protected]
[email protected] ~6.0.0 Please upgrade to [email protected]
[email protected] ~5.2.0 Please upgrade to [email protected]
[email protected] ~5.1.1 Please upgrade to [email protected]
[email protected] ~5.0.0 Not impacted
[email protected] ~4.1.0 Not impacted
[email protected] ~4.0.0 Not impacted
[email protected] ~3.6.0 Not impacted
[email protected] and below ~3.5.0 Not impacted

Workarounds

There is no known workaround except upgrading to a safe version.

For more information

If you have any questions or comments about this advisory:

Thanks to Thomas Rinsma from Codean for the responsible disclosure.

🚨 Uncaught exception in engine.io

Impact

A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process.

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}

This impacts all the users of the engine.io package, including those who uses depending packages like socket.io.

Patches

A fix has been released today (2022/11/20):

Version range Fixed version
[email protected] 3.6.1
[email protected] 6.2.1

For socket.io users:

Version range engine.io version Needs minor update?
[email protected] ~6.2.0 npm audit fix should be sufficient
[email protected] ~6.1.0 Please upgrade to [email protected]
[email protected] ~6.0.0 Please upgrade to [email protected]
[email protected] ~5.2.0 Please upgrade to [email protected]
[email protected] ~5.1.1 Please upgrade to [email protected]
[email protected] ~5.0.0 Please upgrade to [email protected]
[email protected] ~4.1.0 Please upgrade to [email protected] (see here)
[email protected] ~4.0.0 Please upgrade to [email protected] (see here)
[email protected] ~3.6.0 npm audit fix should be sufficient
[email protected] and below ~3.5.0 Please upgrade to [email protected]

Workarounds

There is no known workaround except upgrading to a safe version.

For more information

If you have any questions or comments about this advisory:

Thanks to Jonathan Neve for the responsible disclosure.

Release Notes

6.6.0

More info than we can show here.

6.5.5

More info than we can show here.

6.5.4

More info than we can show here.

6.5.3 (from changelog)

More info than we can show here.

6.5.2

More info than we can show here.

6.5.1

More info than we can show here.

6.5.0

More info than we can show here.

6.4.2

More info than we can show here.

6.4.1

More info than we can show here.

6.4.0

More info than we can show here.

6.3.0

More info than we can show here.

6.2.1

More info than we can show here.

Does any of this look wrong? Please let us know.

↗️ socket.io-parser (indirect, 4.2.1 → 4.2.4) · Repo · Changelog

Security Advisories 🚨

🚨 Insufficient validation when decoding a Socket.IO packet

Impact

A specially crafted Socket.IO packet can trigger an uncaught exception on the Socket.IO server, thus killing the Node.js process.

TypeError: Cannot convert object to primitive value
       at Socket.emit (node:events:507:25)
       at .../node_modules/socket.io/lib/socket.js:531:14

Patches

A fix has been released today (2023/05/22):

Another fix has been released for the 3.3.x branch:

socket.io version socket.io-parser version Needs minor update?
4.5.2...latest ~4.2.0 (ref) npm audit fix should be sufficient
4.1.3...4.5.1 ~4.1.1 (ref) Please upgrade to [email protected]
3.0.5...4.1.2 ~4.0.3 (ref) Please upgrade to [email protected]
3.0.0...3.0.4 ~4.0.1 (ref) Please upgrade to [email protected]
2.3.0...2.5.0 ~3.4.0 (ref) npm audit fix should be sufficient

Workarounds

There is no known workaround except upgrading to a safe version.

For more information

If you have any questions or comments about this advisory:

  • Open a discussion here

Thanks to @rafax00 for the responsible disclosure.

Release Notes

4.2.4 (from changelog)

More info than we can show here.

4.2.3

More info than we can show here.

4.2.2

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Nov 1, 2024
@depfu depfu bot assigned j33f Nov 1, 2024
@depfu depfu bot requested a review from j33f November 1, 2024 07:11
Copy link

sonarcloud bot commented Nov 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant