ts-dot-prop@1.4.3 vulnerabilities

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

Direct Vulnerabilities

Known vulnerabilities in the ts-dot-prop package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable 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