CVE-2017-5941: Arbitrary Code Execution via unserialize() in node-serialize 0.0.4
- Vendor
- Node-Serialize Project
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.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
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.
Mitigation
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.
Remediation
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.
Exploits
3 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.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2017-5941 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2017-5941 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2017-5941?
- Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2017-5941, the earliest disclosed Aug 10, 2025.
- Is there a patch for CVE-2017-5941?
- 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.
- What products are affected by CVE-2017-5941?
- Node-Serialize Project Node-Serialize.
- How severe is CVE-2017-5941?
- CVE-2017-5941 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 61.3% (99th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.