Arbitrary Code Execution via unserialize() in node-serialize 0.0.4
CVE-2017-5941 is a vulnerability in the node-serialize package version 0.0.4 for Node.js. The vulnerability arises when untrusted data is passed to the unserialize() function, which can be exploited by supplying a specially crafted JavaScript object containing an Immediately Invoked Function Expression (IIFE). This allows an attacker to execute arbitrary code in the context of the application using node-serialize.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows remote attackers to execute arbitrary code on the server running a vulnerable version of node-serialize, potentially leading to full system compromise, data theft, or further lateral movement within the environment.
If you can’t patch tonight, do this now.
Do not pass untrusted or user-supplied data to the unserialize() function. Implement input validation and sanitization to ensure only trusted data is deserialized. Consider using alternative serialization mechanisms that do not allow code execution.
Patch, then assume compromise.
Upgrade to a patched version of node-serialize that properly sanitizes input to the unserialize() function and does not allow execution of arbitrary code via IIFE or similar constructs. If node-serialize is not maintained, consider replacing it with a more secure serialization library.
2 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 3 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.