Every CVE Search/ Get API key

CVE-2013-4660

Deserialization Code Execution in js-yaml

6.8 MediumPublic exploitFix available

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.

Exploit likelihood

17.3%Down 62.9 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 6.8

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.

Record
CVE-2013-4660
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2013-4660
Updated
2026-11-02
EUVDEUVD-2017-0338 No score

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.

Record
EUVD-2017-0338
Updated
2026-11-03
GitHub AdvisoriesGHSA-xxvw-45rp-3mj2 No score

Deserialization Code Execution in js-yaml

Versions 2.0.4 and earlier of js-yaml are affected by a code execution vulnerability in the YAML deserializer.

Proof of Concept

const yaml = require('js-yaml');

const x = `test: !!js/function >
function f() { 
console.log(1); 
}();`

yaml.load(x);

Recommendation

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

Record
GHSA-xxvw-45rp-3mj2
Weakness
CWE-20
Updated
2026-11-02
OSVGHSA-xxvw-45rp-3mj2 No score

Deserialization Code Execution in js-yaml

Versions 2.0.4 and earlier of js-yaml are affected by a code execution vulnerability in the YAML deserializer.

Proof of Concept

const yaml = require('js-yaml');

const x = `test: !!js/function >
function f() { 
console.log(1); 
}();`

yaml.load(x);

Recommendation

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

Record
GHSA-xxvw-45rp-3mj2
Weakness
CWE-20
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
js-yaml
npm
before 2.0.5
2.0.5

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
Exploit-DBNodejs - 'js-yaml load()' Code Exec (Metasploit)2013-09-30
MetasploitNodejs js-yaml load() Code Execution2013-06-28

History

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

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

In short

CVE-2013-4660 is a medium vulnerability (CVSS 6.8) in Nodeca Js-yaml, published June 28, 2013. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 17.3%, the 97th percentile. Fixed in js-yaml 2.0.5.

References

MoveEnter Open