ts-dot-prop@1.3.2 vulnerabilities

TypeScript utility to transform nested objects using a dot notation path.

  • latest version

    2.1.4

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    6 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the ts-dot-prop 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

    ts-dot-prop is a TypeScript utility to transform nested objects using a dot notation path.

    Affected versions of this package are vulnerable to Prototype Pollution. The set function can be used to set properties of the Object prototype. It fails to restrict access to prototypes of objects, allowing for modification of prototype behavior, which may allow obtaining sensitive information/DoS/RCE.

    PoC

    const tsDot = require('ts-dot-prop');
    var obj = {}
    console.log("Before : " + obj.isAdmin);
    tsDot.set(obj, '__proto__.isAdmin', true);
    console.log("After : " + obj.isAdmin);
    

    How to fix Prototype Pollution?

    Upgrade ts-dot-prop to version 1.5.0 or higher.

    <1.5.0