Improper Input Validation The advisory has been revoked - it doesn't affect any version of package socket.io  (opens in a new tab)


Threat Intelligence

EPSS
1.44% (74th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-SOCKETIO-3063693
  • published30 Oct 2022
  • disclosed26 Oct 2022
  • creditThomas Rinsma

Introduced: 26 Oct 2022

CVE-2022-2421  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

There is no fixed version for socket.io.

Amendment

This was deemed not a vulnerability.

Overview

socket.io is a node.js realtime framework server.

Affected versions of this package are vulnerable to Improper Input Validation when parsing attachments containing untrusted user input. Attackers can overwrite the _placeholder object to place references to functions in query objects.

PoC

const decoder = new Decoder();

decoder.on("decoded", (packet) => {
  console.log(packet.data); // prints [ 'hello', [Function: splice] ]
})

decoder.add('51-["hello",{"_placeholder":true,"num":"splice"}]');
decoder.add(Buffer.from("world"));