CVE-2024-38355 Unhandled 'error' event in socket.io
A specially crafted packet causes an uncaught exception, crashing the Node.js server process. Users should upgrade Socket.IO or add error listeners.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-38355?
CVE-2024-38355 is a high-severity denial of service vulnerability in socketio socket.io, published on 19 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Socket.IO is an open source, real-time, bidirectional, event-based, communication framework. A specially crafted Socket.IO packet can trigger an uncaught exception on the Socket.IO server, thus killing the Node.js process. This issue is fixed by commit `15af22fc22` which has been included in `[email protected]` (released in May 2023). The fix was backported in the 2.x branch as well with commit `d30630ba10`. Users are advised to upgrade. Users unable to upgrade may attach a listener for the "error" event to catch these errors.
Which versions are affected by CVE-2024-38355?
4 open source packages ship an affected version, including socket.io.
| Package | Affected | Fixed in |
|---|---|---|
socket.io npm | All versions | 2.5.1 |
socket.io npm | All versions | 2.5.1 |
socket.io npm | From 3.0.0 | 4.6.2 |
socket.io npm | From 3.0.0 | 4.6.2 |
How do I fix CVE-2024-38355?
Upgrade socket.io to a fixed version for your release line: 2.5.1 or 4.6.2.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-38355 being exploited?
There is no known exploitation of CVE-2024-38355 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as CLSA-2026-1789549941, GHSA-25hc-qcg6-38wj, ROOT-APP-NPM-CVE-2024-38355.