dotty@0.1.0 vulnerabilities

Access properties of nested objects using dot-path notation

Direct Vulnerabilities

Known vulnerabilities in the dotty 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
  • 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
  • H
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. The put() function does not check for the type of object before assigning a value to the property. This vulnerability can be exploited by attackers to cause a denial of service and potentially remote code execution.

How to fix Prototype Pollution?

Upgrade dotty to version 0.1.1 or higher.

<0.1.1