CVE-2017-5941 Code Execution through IIFE in node-serialize

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
node-serialize npmAll versions to 0.0.4None
node-serialize npmAll versions to 0.0.4None

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.

Is CVE-2017-5941 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free