{"id":"CVE-2013-4660","aliases":["EUVD-2017-0338","GHSA-xxvw-45rp-3mj2"],"status":"published","title":"Deserialization Code Execution in js-yaml","description":"The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, which allows remote attackers to execute arbitrary code via a crafted string that triggers an eval operation.","severity":{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.17186,"percentile":0.97112,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-20"],"published":"2013-06-28T14:00:00Z","modified":"2026-06-16T23:57:40Z","exploits":[{"source":"exploitdb","id":"EDB-28655","title":"Nodejs - 'js-yaml load()' Code Exec (Metasploit)","type":"local","platform":"multiple","date":"2013-09-30","verified":true,"url":"https://www.exploit-db.com/exploits/28655"},{"source":"metasploit","id":"exploit/multi/fileformat/nodejs_js_yaml_load_code_exec","title":"Nodejs js-yaml load() Code Execution","type":"exploit","platform":"NodeJS","date":"2013-06-28","verified":true,"url":"https://www.rapid7.com/db/modules/exploit/multi/fileformat/nodejs_js_yaml_load_code_exec"}],"fixes":[{"ecosystem":"npm","package":"js-yaml","fixed_in":["2.0.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"js-yaml","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.5"}]}]},{"source":"osv","ecosystem":"npm","package":"js-yaml","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.5"}]}]}],"products":[{"vendor":"nodeca","product":"js-yaml"}],"references":[{"url":"https://nealpoole.com/blog/2013/06/code-execution-via-yaml-in-js-yaml-nodejs-module/","tags":["x_refsource_MISC","x_transferred","Exploit","Vendor Advisory"]},{"url":"http://portal.nodesecurity.io/advisories/js-yaml","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2013-4660","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-xxvw-45rp-3mj2","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/16","tags":["web"]},{"url":"https://nealpoole.com/blog/2013/06/code-execution-via-yaml-in-js-yaml-nodejs-module","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2013-4660","description":"The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, which allows remote attackers to execute arbitrary code via a crafted string that triggers an eval operation.","status":"published","published":"2013-06-28T14:00:00Z","modified":"2024-09-17T02:11:39.386Z","updated_at":"2026-11-02T14:34:58.193873Z"}],"euvd":[{"id":"EUVD-2017-0338","description":"The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, which allows remote attackers to execute arbitrary code via a crafted string that triggers an eval operation.","status":"published","published":"2013-06-28T14:00:00Z","modified":"2024-09-17T02:11:39Z","updated_at":"2026-11-03T00:28:42.924013Z"}],"ghsa":[{"id":"GHSA-xxvw-45rp-3mj2","title":"Deserialization Code Execution in js-yaml","description":"Versions 2.0.4 and earlier of `js-yaml` are affected by a code execution vulnerability in the YAML deserializer.\n\n## Proof of Concept\n```\nconst yaml = require('js-yaml');\n\nconst x = `test: !!js/function \u003e\nfunction f() { \nconsole.log(1); \n}();`\n\nyaml.load(x);\n```\n\n\n## Recommendation\n\nUpdate js-yaml to version 2.0.5 or later, and ensure that all instances where the `.load()` method is called are updated to use `.safeLoad()` instead.","status":"published","published":"2017-10-24T18:33:37Z","modified":"2023-01-09T05:03:30Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:36:05.071174Z"}],"nvd":[{"id":"CVE-2013-4660","description":"The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, which allows remote attackers to execute arbitrary code via a crafted string that triggers an eval operation.","status":"published","published":"2013-06-28T14:55:02.803Z","modified":"2026-06-16T23:57:40.687Z","cvss":[{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:02:29.210317Z"}],"osv":[{"id":"GHSA-xxvw-45rp-3mj2","title":"Deserialization Code Execution in js-yaml","description":"Versions 2.0.4 and earlier of `js-yaml` are affected by a code execution vulnerability in the YAML deserializer.\n\n## Proof of Concept\n```\nconst yaml = require('js-yaml');\n\nconst x = `test: !!js/function \u003e\nfunction f() { \nconsole.log(1); \n}();`\n\nyaml.load(x);\n```\n\n\n## Recommendation\n\nUpdate js-yaml to version 2.0.5 or later, and ensure that all instances where the `.load()` method is called are updated to use `.safeLoad()` instead.","status":"published","published":"2017-10-24T18:33:37Z","modified":"2023-11-08T03:57:24.142876Z","cwes":["CWE-20"],"updated_at":"2026-11-02T15:47:00.604718Z"}]}}
