Advisory

GHSA-xxvw-45rp-3mj2

Also known as: CVE-2013-4660

Summary

Deserialization Code Execution in js-yaml

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2017-10-24 18:33 UTC
Modified
2023-11-08 03:57 UTC

Affected packages and fixes

js-yaml

npm · All systems

Affected

  • introduced 0, fixed 2.0.5 (semver)

Fixed versions

2.0.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences