{"answers":{"affected":"2 open source packages ship an affected version, including node-serialize. It affects 1 product.","exploited":"There is no known exploitation of CVE-2017-5941 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2017-5941 yet. Limit exposure of the affected software until one is available.","what":"CVE-2017-5941 is a critical unsafe deserialization vulnerability in n/a, published on 9 Feb 2017. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2017-5941 and fix it if it is affected.\n\nWhat it is: CVE-2017-5941 is a critical unsafe deserialization vulnerability in n/a, published on 9 Feb 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2017-5941 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- node-serialize (npm): affected all versions up to 0.0.4; no fix listed\n- node-serialize (npm): affected all versions up to 0.0.4; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2017-5941/ (Markdown: https://insights.sbomify.com/CVE-2017-5941/index.md)","id":"CVE-2017-5941","markdown":"https://insights.sbomify.com/CVE-2017-5941/index.md","name":"CVE-2017-5941","record":{"aliases":["GHSA-q4v7-4rhw-9hqm"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js serialization library","requires_auth":"none","summary":"Attackers can execute arbitrary code by sending malicious serialized data to the unserialize function in the node-serialize library.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"node-serialize","vendor":"node-serialize_project"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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).","ecosystems":["npm"],"exploits":{"exploitdb":3,"first_seen":"2017-02-08","github_poc":7,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-08-18T00:54:43Z","kind":"github_poc","ref":"https://github.com/uartu0/nodejshell","stars":2,"title":"Exploit de reverseshell para desserialização em NodeJs (CVE-2017-5941)"},{"date":"2017-02-08","kind":"exploitdb","ref":"45265","stars":null,"title":"Node.JS - 'node-serialize' Remote Code Execution"},{"date":"2020-11-10T08:50:03Z","kind":"github_poc","ref":"https://github.com/Frivolous-scholar/CVE-2017-5941-NodeJS-RCE","stars":0,"title":null},{"date":"2021-02-10","kind":"exploitdb","ref":"49552","stars":null,"title":"Node.JS - 'node-serialize' Remote Code Execution (2)"},{"date":"2021-06-18","kind":"exploitdb","ref":"50036","stars":null,"title":"Node.JS - 'node-serialize' Remote Code Execution (3)"},{"date":"2023-03-30T06:39:25Z","kind":"github_poc","ref":"https://github.com/turnernator1/Node.js-CVE-2017-5941","stars":0,"title":null},{"date":"2023-05-10T06:01:10Z","kind":"github_poc","ref":"https://github.com/Cr4zyD14m0nd137/Lab-for-cve-2018-15133","stars":0,"title":"Ejecución de exploit de deserialización con CVE-2017-5941"},{"date":"2025-08-10T07:54:17Z","kind":"github_poc","ref":"https://github.com/kylew1004/cve-2017-5941-poc-docker-lab","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":false,"headline":"Code Execution through IIFE in node-serialize","id":"CVE-2017-5941","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"deserialization","year":"2017"},"n_packages":2,"n_references":5,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2017-5942"},"packages":[{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["0.0.4"],"package":"node-serialize","purl":null,"source":"GHSA-q4v7-4rhw-9hqm"},{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["0.0.4"],"package":"node-serialize","purl":"pkg:npm/node-serialize","source":"GHSA-q4v7-4rhw-9hqm"}],"prev":{"headline":"Privilege escalation in n/a","id":"CVE-2017-5940"},"products":["n/a"],"published":"2017-02-09","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code by sending malicious serialized data to the unserialize function in the node-serialize library.","url":"https://insights.sbomify.com/CVE-2017-5941/"}