Every CVE Search/ Get API key

CVE-2017-5941

Code Execution through IIFE in node-serialize

9.8 CriticalPublic exploit

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).

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

61.3%Up 53.6 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

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).

Record
CVE-2017-5941
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-502
Updated
2026-11-02
CVE List No score

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).

Record
CVE-2017-5941
Updated
2026-11-02
EUVDEUVD-2018-0309 No score

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).

Record
EUVD-2018-0309
Updated
2026-11-03
GitHub AdvisoriesGHSA-q4v7-4rhw-9hqm 9.8

Code Execution through IIFE in node-serialize

Affected versions of node-serialize can be abused to execute arbitrary code via an immediately invoked function expression (IIFE) if untrusted user input is passed into unserialize().

Recommendation

There is no direct patch for this issue. The package author has reviewed this advisory, and provided the following recommendation:

To avoid the security issues, at least one of the following methods should be taken:

1. Make sure to send serialized strings internally, isolating them from potential hackers. For example, only sending the strings from backend to fronend and always using HTTPS instead of HTTP.

2. Introduce public-key cryptosystems (e.g. RSA) to ensure the strings not being tampered with.
Record
GHSA-q4v7-4rhw-9hqm
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
OSVGHSA-q4v7-4rhw-9hqm 9.8

Code Execution through IIFE in node-serialize

Affected versions of node-serialize can be abused to execute arbitrary code via an immediately invoked function expression (IIFE) if untrusted user input is passed into unserialize().

Recommendation

There is no direct patch for this issue. The package author has reviewed this advisory, and provided the following recommendation:

To avoid the security issues, at least one of the following methods should be taken:

1. Make sure to send serialized strings internally, isolating them from potential hackers. For example, only sending the strings from backend to fronend and always using HTTPS instead of HTTP.

2. Introduce public-key cryptosystems (e.g. RSA) to ensure the strings not being tampered with.
Record
GHSA-q4v7-4rhw-9hqm
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
node-serialize
npm
through 0.0.4 None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
Exploit-DBNode.JS - 'node-serialize' Remote Code Execution2017-02-08
Exploit-DBNode.JS - 'node-serialize' Remote Code Execution (2)2021-02-10
Exploit-DBNode.JS - 'node-serialize' Remote Code Execution (3)2021-06-18
PoC in GitHubCr4zyD14m0nd137/Lab-for-cve-2018-151332023-05-10
PoC in GitHubFrivolous-scholar/CVE-2017-5941-NodeJS-RCE2020-11-10
PoC in GitHubf41k0n/RCE-NodeJs2025-10-12
PoC in GitHubjimahub/scenario-c-block2026-09-28
PoC in GitHubkylew1004/cve-2017-5941-poc-docker-lab2025-08-10
PoC in GitHubturnernator1/Node.js-CVE-2017-59412023-03-30
PoC in GitHubuartu0/nodejshell2023-08-18

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, Exploit-DB, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2017-5941 is a critical vulnerability (CVSS 9.8) in Node-serialize Project Node-serialize, published February 9, 2017. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 61.3%, the 99th percentile. No source names a fixed version.

References

MoveEnter Open