set-value@0.4.2 vulnerabilities

Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.

  • latest version

    4.1.0

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    3 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the set-value package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Prototype Pollution

    set-value is a package that creates nested values and any intermediaries using dot notation ('a.b.c') paths.

    Affected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of CVE-2019-10747 when the user-provided keys used in the path parameter are arrays.

    PoC

    const set = require("set-value")
    
    // set({}, ['__proto__','polluted'], 'yes');
    // console.log(polluted); // Error: Cannot set unsafe key: "__proto__"
    
    set({}, [['__proto__'],'polluted'], 'yes');
    console.log(polluted);
    

    How to fix Prototype Pollution?

    Upgrade set-value to version 2.0.1, 3.0.3, 4.0.1 or higher.

    <2.0.1>=3.0.0 <3.0.3>=4.0.0 <4.0.1
    • H
    Prototype Pollution

    set-value is a package that creates nested values and any intermediaries using dot notation ('a.b.c') paths.

    Affected versions of this package are vulnerable to Prototype Pollution. The function set-value could be tricked into adding or modifying properties of Object.prototype using any of the constructor, prototype and _proto_ payloads.

    How to fix Prototype Pollution?

    Upgrade set-value to version 2.0.1, 3.0.1 or higher.

    <2.0.1>=3.0.0 <3.0.1