CVE-2017-5954 Code Execution Through IIFE in serialize-to-js

Critical 9.8 Published Updated

Attackers can achieve arbitrary code execution by passing malicious JavaScript objects to the deserialize function in the serialize-to-js package.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-5954?

CVE-2017-5954 is a critical unsafe deserialization vulnerability in n/a, published on 10 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 serialize-to-js package 0.5.0 for Node.js. Untrusted data passed into the deserialize() 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-5954?

2 open source packages ship an affected version, including serialize-to-js. It affects 1 product.

PackageAffectedFixed in
serialize-to-js npmAll versions1.0.0
serialize-to-js npmAll versions1.0.0

Products include Serialize-to-Js Project Serialize-to-Js.

How do I fix CVE-2017-5954?

Upgrade serialize-to-js to 1.0.0 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2017-5954 being exploited?

There is no known exploitation of CVE-2017-5954 in the wild and no public exploit code.

Sources

Also known as GHSA-mm62-wxc8-cf7m.

Is CVE-2017-5954 in your software?

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

Check your SBOMs for free