CVE-2017-5941 Code Execution through IIFE in node-serialize
Attackers can execute arbitrary code by sending malicious serialized data to the unserialize function in the node-serialize library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2017-5941?
CVE-2017-5941 is a critical unsafe deserialization vulnerability in n/a, published on 9 Feb 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Untrusted data passed into the unserialize() function can be exploited to achieve arbitrary code execution by passing a JavaScript Object with an Immediately Invoked Function Expression (IIFE).
Weakness: CWE-502
Which versions are affected by CVE-2017-5941?
2 open source packages ship an affected version, including node-serialize. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
node-serialize npm | All versions to 0.0.4 | None |
node-serialize npm | All versions to 0.0.4 | None |
Products include Node-Serialize Project Node-Serialize.
How do I fix CVE-2017-5941?
No fix has been published for CVE-2017-5941 yet. Limit exposure of the affected software until one is available.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2017-5941 being exploited?
There is no known exploitation of CVE-2017-5941 in the wild and no public exploit code.
Public exploit code: 3 Exploit-DB entries and 7 proofs of concept on GitHub.
Sources
Also known as GHSA-q4v7-4rhw-9hqm.