{"id":"CVE-2017-5941","aliases":["EUVD-2018-0309","GHSA-q4v7-4rhw-9hqm"],"status":"published","title":"Code Execution through IIFE in node-serialize","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).","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.61285,"percentile":0.99168,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":false},"cwes":["CWE-502"],"published":"2017-02-09T19:00:00Z","modified":"2026-06-17T01:21:28Z","exploits":[{"source":"exploitdb","id":"EDB-45265","title":"Node.JS - 'node-serialize' Remote Code Execution","type":"remote","platform":"linux","date":"2017-02-08","url":"https://www.exploit-db.com/exploits/45265"},{"source":"exploitdb","id":"EDB-49552","title":"Node.JS - 'node-serialize' Remote Code Execution (2)","type":"webapps","platform":"nodejs","date":"2021-02-10","url":"https://www.exploit-db.com/exploits/49552"},{"source":"exploitdb","id":"EDB-50036","title":"Node.JS - 'node-serialize' Remote Code Execution (3)","type":"webapps","platform":"nodejs","date":"2021-06-18","url":"https://www.exploit-db.com/exploits/50036"},{"source":"pocgithub","id":"Cr4zyD14m0nd137/Lab-for-cve-2018-15133","title":"Cr4zyD14m0nd137/Lab-for-cve-2018-15133","date":"2023-05-10","url":"https://github.com/Cr4zyD14m0nd137/Lab-for-cve-2018-15133"},{"source":"pocgithub","id":"Frivolous-scholar/CVE-2017-5941-NodeJS-RCE","title":"Frivolous-scholar/CVE-2017-5941-NodeJS-RCE","date":"2020-11-10","url":"https://github.com/Frivolous-scholar/CVE-2017-5941-NodeJS-RCE"},{"source":"pocgithub","id":"f41k0n/RCE-NodeJs","title":"f41k0n/RCE-NodeJs","date":"2025-10-12","url":"https://github.com/f41k0n/RCE-NodeJs"},{"source":"pocgithub","id":"jimahub/scenario-c-block","title":"jimahub/scenario-c-block","date":"2026-09-28","url":"https://github.com/jimahub/scenario-c-block"},{"source":"pocgithub","id":"kylew1004/cve-2017-5941-poc-docker-lab","title":"kylew1004/cve-2017-5941-poc-docker-lab","date":"2025-08-10","url":"https://github.com/kylew1004/cve-2017-5941-poc-docker-lab"},{"source":"pocgithub","id":"turnernator1/Node.js-CVE-2017-5941","title":"turnernator1/Node.js-CVE-2017-5941","date":"2023-03-30","url":"https://github.com/turnernator1/Node.js-CVE-2017-5941"},{"source":"pocgithub","id":"uartu0/nodejshell","title":"uartu0/nodejshell","date":"2023-08-18","url":"https://github.com/uartu0/nodejshell"}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"node-serialize","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.0.4"}]}]},{"source":"osv","ecosystem":"npm","package":"node-serialize","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.0.4"}]}]}],"products":[{"vendor":"node-serialize_project","product":"node-serialize"}],"references":[{"url":"https://nodesecurity.io/advisories/311","tags":["x_refsource_MISC","x_transferred","Third Party Advisory"]},{"url":"https://opsecx.com/index.php/2017/02/08/exploiting-node-js-deserialization-bug-for-remote-code-execution/","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/96225","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","web"]},{"url":"http://packetstormsecurity.com/files/161356/Node.JS-Remote-Code-Execution.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry","web"]},{"url":"http://packetstormsecurity.com/files/163222/Node.JS-Remote-Code-Execution.html","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-5941","tags":["advisory"]},{"url":"https://github.com/luin/serialize/issues/4","tags":["web"]},{"url":"https://github.com/advisories/GHSA-q4v7-4rhw-9hqm","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/311","tags":["web"]},{"url":"https://opsecx.com/index.php/2017/02/08/exploiting-node-js-deserialization-bug-for-remote-code-execution","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2017-5941","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).","status":"published","published":"2017-02-09T19:00:00Z","modified":"2024-08-05T15:18:48.916Z","updated_at":"2026-11-02T14:33:12.942409Z"}],"euvd":[{"id":"EUVD-2018-0309","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).","status":"published","published":"2017-02-09T19:00:00Z","modified":"2024-08-05T15:18:48Z","updated_at":"2026-11-03T02:39:13.436112Z"}],"ghsa":[{"id":"GHSA-q4v7-4rhw-9hqm","title":"Code Execution through IIFE in node-serialize","description":"Affected versions of `node-serialize` can be abused to execute arbitrary code via an [immediately invoked function expression](https://en.wikipedia.org/wiki/Immediately-invoked_function_expression) (IIFE) if untrusted user input is passed into `unserialize()`.\n\n\n## Recommendation\n\nThere is no direct patch for this issue. The package author has reviewed this advisory, and provided the following recommendation:\n\n```\nTo avoid the security issues, at least one of the following methods should be taken:\n\n1. 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.\n\n2. Introduce public-key cryptosystems (e.g. RSA) to ensure the strings not being tampered with.\n```","status":"published","published":"2018-07-18T18:27:56Z","modified":"2023-02-01T05:04:02Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:36:32.120868Z"}],"nvd":[{"id":"CVE-2017-5941","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).","status":"published","published":"2017-02-09T19:59:00.147Z","modified":"2026-06-17T01:21:28.7Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:03:42.372487Z"}],"osv":[{"id":"GHSA-q4v7-4rhw-9hqm","title":"Code Execution through IIFE in node-serialize","description":"Affected versions of `node-serialize` can be abused to execute arbitrary code via an [immediately invoked function expression](https://en.wikipedia.org/wiki/Immediately-invoked_function_expression) (IIFE) if untrusted user input is passed into `unserialize()`.\n\n\n## Recommendation\n\nThere is no direct patch for this issue. The package author has reviewed this advisory, and provided the following recommendation:\n\n```\nTo avoid the security issues, at least one of the following methods should be taken:\n\n1. 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.\n\n2. Introduce public-key cryptosystems (e.g. RSA) to ensure the strings not being tampered with.\n```","status":"published","published":"2018-07-18T18:27:56Z","modified":"2023-11-08T03:59:23.528224Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:46:54.055966Z"}]}}
