Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1yN3FwLWNmaHYtcDg0d84AAv_b

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.

Permalink: https://github.com/advisories/GHSA-r7qp-cfhv-p84w
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yN3FwLWNmaHYtcDg0d84AAv_b
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 1 year ago
Updated: about 1 year ago


CVSS Score: 6.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Identifiers: GHSA-r7qp-cfhv-p84w, CVE-2022-41940
References: Repository: https://github.com/socketio/engine.io
Blast Radius: 39.5

Affected Packages

npm:engine.io
Dependent packages: 405
Dependent repositories: 1,213,452
Downloads: 22,890,485 last month
Affected Version Ranges: >= 4.0.0, < 6.2.1, < 3.6.1
Fixed in: 6.2.1, 3.6.1
All affected versions: 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.7.9, 0.7.10, 0.7.11, 0.7.12, 0.7.13, 0.7.14, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.2.0, 3.2.1, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.4.1, 3.4.2, 3.5.0, 3.6.0, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.1.0, 4.1.1, 4.1.2, 5.0.0, 5.1.0, 5.1.1, 5.2.0, 5.2.1, 6.0.0, 6.0.1, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.2.0
All unaffected versions: 3.6.1, 6.2.1, 6.3.0, 6.3.1, 6.4.0, 6.4.1, 6.4.2, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4