CVE-2023-32695:
Insufficient validation when decoding a Socket.IO packet
7.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.37977%
CWE
Published
5/23/2023
Updated
11/18/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
socket.io-parser | npm | >= 3.4.0, < 3.4.3 | 3.4.3 |
socket.io-parser | npm | >= 4.0.4, < 4.2.3 | 4.2.3 |
socket.io-parser | npm | < 3.3.4 | 3.3.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient input validation in Socket.IO's packet decoding logic. Patches introduced the isPayloadValid()
function to enforce strict type checks on event names. The decodeString
function (called by Decoder.add
) previously allowed arrays with non-primitive first elements as event names. When such malformed packets were emitted via Socket.emit()
, JavaScript's type coercion failed, causing uncaught exceptions. The commit diffs show these functions were modified to add validation, confirming their role in the vulnerability.