GHSA-8j8c-7jfh-h6hx

    Dashboard / Vulnerabilities / GHSA-8j8c-7jfh-h6hx

    GHSA-8j8c-7jfh-h6hx

    Published: 4 Jun 2019Last Modified: 31 Aug 2020

    Summary: Code Injection in js-yaml

    Details: Versions of `js-yaml` prior to 3.13.1 are vulnerable to Code Injection. The `load()` function may execute arbitrary code injected through a malicious YAML file. Objects that have `toString` as key, JavaScript code as value and are used as explicit mapping keys allow attackers to execute the supplied code through the `load()` function. The `safeLoad()` function is unaffected. An example payload is `{ toString: !<tag:yaml.org,2002:js/function> 'function (){return Date.now()}' } : 1` which returns the object { "1553107949161": 1 } ## Recommendation Upgrade to version 3.13.1.

    Affected packages

    Package

    Name: js-yaml

    Purl: pkg:npm/js-yaml

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -3.13.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High