CVE-2022-2421 Socket.io - Improper type validation in attachment parsing
Attackers can inject arbitrary function references into query objects via improper type validation in Socket.io parser, potentially leading to code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-2421?
CVE-2022-2421 is a critical code injection vulnerability in Socket.io-Parser, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Due to improper type validation in attachment parsing the Socket.io js library, it is possible to overwrite the _placeholder object which allows an attacker to place references to functions at arbitrary places in the resulting query object.
Weakness: CWE-89
Which versions are affected by CVE-2022-2421?
8 open source packages ship an affected version, including socket.io-parser. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
socket.io-parser npm | All versions | 3.3.3 |
socket.io-parser npm | All versions | 3.3.3 |
socket.io-parser npm | From 3.4.0 | 3.4.2 |
socket.io-parser npm | From 3.4.0 | 3.4.2 |
socket.io-parser npm | From 4.0.0 | 4.0.5 |
socket.io-parser npm | From 4.0.0 | 4.0.5 |
2 more packages
socket.io-parser npm | From 4.1.0 | 4.2.1 |
socket.io-parser npm | From 4.1.0 | 4.2.1 |
Products include Socket Socket.io-Parser.
How do I fix CVE-2022-2421?
Upgrade socket.io-parser to a fixed version for your release line: 3.3.3, 3.4.2, 4.0.5 or 4.2.1.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2022-2421 being exploited?
There is no known exploitation of CVE-2022-2421 in the wild and no public exploit code.
Other vulnerabilities in Socket.io-Parser
Sources
Also known as GHSA-qm95-pgcg-qqfq.