Vulnerability in socket.io (CVE-2024-38355)
Summary
Vulnerability in socket.io (CVE-2024-38355). Risk of unauthorized operations or information disclosure. Exploitable via socket.io. Mitigation: upgrade to 2.5.1 or later.
Original description
The description as published by the source.
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 socket.io@4.6.2 (at least) |
2.3.0...2.5.0 |
Please upgrade to socket.io@2.5.1 |
Patches
This issue is fixed by https://github.com/socketio/socket.io/commit/15af22fc22bc6030fcead322c106f07640336115, included in socket.io@4.6.2 (released in May 2023).
The fix was backported in the 2.x branch today: https://github.com/socketio/socket.io/commit/d30630ba10562bf987f4d2b42440fc41a828119c
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…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2024-38355 has been found in socket.io.
Attackers can target a specific entry point like socket.io over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade socket.io to 2.5.1 or later.
If unsure, ask your IT team or search "socket.io CVE-2024-38355" on the vendor's site.
CVE-2024-38355 (socket.io) — CWE-20
Attack surface: socket.io
Patched: 2.5.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-20) exists in socket.io. Attackers reach the vulnerable code path via socket.io.
Check the vendor advisory for the affected versions of socket.io. Attack surface: socket.io.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 2.5.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'socket.io' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'socket.io' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
socket.ioを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade socket.io to 2.5.1ステージング環境で 2.5.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com