HexBrain

Node.js third-party modules · Report #317548

Regular Expression Denial of Service (ReDoS)

Validstatus
mediumseverity
2upvotes
3 Apr 2019disclosed

How it was found

The issue was already fixed.

Module: is-my-json-valid

Summary: Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. It used a regular expression (/^\S+@\S+$/) in order to validate emails. This can cause an impact of about 10 seconds matching time for data 90K characters long.

Description: Regex: formats.js exports[‘email’] = /^\S+@\S+$/ (introduced in 2014, 34a1a706)

Supporting Material/References:

Impact

Denial of service through blocking the event loop.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original