socket.io-parser@4.0.5 vulnerabilities

socket.io protocol parser

Direct Vulnerabilities

Known vulnerabilities in the socket.io-parser package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Denial of Service (DoS)

socket.io-parser is a socket.io protocol parser

Affected versions of this package are vulnerable to Denial of Service (DoS) due to insufficient validation when decoding a packet. An attacker can send an event with a name like '2[{"toString":"foo"}]' to trigger an uncaught exception and a crash, like the below.

TypeError: Cannot convert object to primitive value
       at Socket.emit (node:events:507:25)
       at .../node_modules/socket.io/lib/socket.js:531:14

How to fix Denial of Service (DoS)?

Upgrade socket.io-parser to version 3.4.3, 4.2.3 or higher.

>=3.4.0 <3.4.3 >=4.0.0 <4.2.3