Every CVE Search/ Get API key

CVE-2022-21676

Uncaught Exception in engine.io

7.5 HighFix available

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package starting from version 4.0.0, including those who uses depending packages like socket.io. Versions prior to 4.0.0 are not impacted. A fix has been released for each major branch, namely 4.1.2 for the 4.x.x branch, 5.2.1 for the 5.x.x branch, and 6.1.1 for the 6.x.x branch. There is no known workaround except upgrading to a safe version.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.85%Up 1.7 points since Feb 8, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.5

Uncaught Exception in engine.io

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package starting from version 4.0.0, including those who uses depending packages like socket.io. Versions prior to 4.0.0 are not impacted. A fix has been released for each major branch, namely 4.1.2 for the 4.x.x branch, 5.2.1 for the 5.x.x branch, and 6.1.1 for the 6.x.x branch. There is no known workaround except upgrading to a safe version.

Record
CVE-2022-21676
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-754
Updated
2026-11-02
EUVDEUVD-2022-0421 7.5

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package starting from version 4.0.0, including those who uses depending packages like socket.io. Versions prior to 4.0.0 are not impacted. A fix has been released for each major branch, namely 4.1.2 for the 4.x.x branch, 5.2.1 for the 5.x.x branch, and 6.1.1 for the 6.x.x branch. There is no known workaround except upgrading to a safe version.

Record
EUVD-2022-0421
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-273r-mgr4-v34f 7.5

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.

RangeError: Invalid WebSocket frame: RSV2 and RSV3 must be clear at Receiver.getInfo (/.../node_modules/ws/lib/receiver.js:176:14) at Receiver.startLoop (/.../node_modules/ws/lib/receiver.js:136:22) at Receiver._write (/.../node_modules/ws/lib/receiver.js:83:10) at writeOrBuffer (internal/streams/writable.js:358:12)

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

Patches

A fix has been released for each major branch:

| Version range | Fixed version | | --- | --- | | [email protected] | 4.1.2 | | [email protected] | 5.2.1 | | [email protected] | 6.1.1 |

Previous versions (< 4.0.0) are not impacted.

For socket.io users:

| Version range | engine.io version | Needs minor update? | | --- | --- | --- | | [email protected] | ~6.1.0 | - | [email protected] | ~6.0.0 | Please upgrade to [email protected] | [email protected] | ~5.2.0 | - | [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 | - | [email protected] | ~4.0.0 | Please upgrade to [email protected] or [email protected] (see here)

In most cases, running npm audit fix should be sufficient. You can also use npm update engine.io --depth=9999.

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 Marcus Wejderot from Mevisio for the responsible disclosure.

Record
GHSA-273r-mgr4-v34f
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-754, CWE-755
Updated
2026-11-02
NVD 7.5

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package starting from version 4.0.0, including those who uses depending packages like socket.io. Versions prior to 4.0.0 are not impacted. A fix has been released for each major branch, namely 4.1.2 for the 4.x.x branch, 5.2.1 for the 5.x.x branch, and 6.1.1 for the 6.x.x branch. There is no known workaround except upgrading to a safe version.

Record
CVE-2022-21676
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-754, CWE-755
Updated
2026-11-02
OSV 7.5

Uncaught Exception in engine.io

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package starting from version 4.0.0, including those who uses depending packages like socket.io. Versions prior to 4.0.0 are not impacted. A fix has been released for each major branch, namely 4.1.2 for the 4.x.x branch, 5.2.1 for the 5.x.x branch, and 6.1.1 for the 6.x.x branch. There is no known workaround except upgrading to a safe version.

Record
CVE-2022-21676
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-754
Updated
2026-11-02
OSVGHSA-273r-mgr4-v34f 7.5

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.

RangeError: Invalid WebSocket frame: RSV2 and RSV3 must be clear at Receiver.getInfo (/.../node_modules/ws/lib/receiver.js:176:14) at Receiver.startLoop (/.../node_modules/ws/lib/receiver.js:136:22) at Receiver._write (/.../node_modules/ws/lib/receiver.js:83:10) at writeOrBuffer (internal/streams/writable.js:358:12)

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

Patches

A fix has been released for each major branch:

| Version range | Fixed version | | --- | --- | | [email protected] | 4.1.2 | | [email protected] | 5.2.1 | | [email protected] | 6.1.1 |

Previous versions (< 4.0.0) are not impacted.

For socket.io users:

| Version range | engine.io version | Needs minor update? | | --- | --- | --- | | [email protected] | ~6.1.0 | - | [email protected] | ~6.0.0 | Please upgrade to [email protected] | [email protected] | ~5.2.0 | - | [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 | - | [email protected] | ~4.0.0 | Please upgrade to [email protected] or [email protected] (see here)

In most cases, running npm audit fix should be sufficient. You can also use npm update engine.io --depth=9999.

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 Marcus Wejderot from Mevisio for the responsible disclosure.

Record
GHSA-273r-mgr4-v34f
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-754, CWE-755
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
engine.io
npm
4.0.0 up to 4.1.2
4.1.2
engine.io
npm
5.0.0 up to 5.2.1
5.2.1
engine.io
npm
6.0.0 up to 6.1.1
6.1.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-21676 is a high vulnerability (CVSS 7.5) in Socket Engine.io, published January 12, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.85%, the 86th percentile. Fixed in engine.io 4.1.2.

References

Show 6 moreShow less
MoveEnter Open