Improper Input Validation Affecting org.webjars.npm:socket.io-parser package, versions [,4.0.5) [4.1.0,4.2.1)
Snyk CVSS
Attack Complexity
Low
Confidentiality
High
Integrity
High
Availability
High
Threat Intelligence
EPSS
0.13% (47th
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 ID SNYK-JAVA-ORGWEBJARSNPM-3091013
- published 30 Oct 2022
- disclosed 26 Oct 2022
- credit Thomas Rinsma
Introduced: 26 Oct 2022
CVE-2022-2421 Open this link in a new tabHow to fix?
Upgrade org.webjars.npm:socket.io-parser
to version 4.0.5, 4.2.1 or higher.
Overview
org.webjars.npm:socket.io-parser is a socket.io protocol parser
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"));