FlawAtlas
Search the atlas
CVE-2020-7754 High

Regular expression denial of service in npm-user-validate

This affects the package npm-user-validate before 1.0.1. The regex that validates user emails took exponentially longer to process long input strings beginning with @ characters.

Exploit probability 3.5%
Published May 10, 2021
Required by Not available
Last source change July 8, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

8 explicit affected versions

npm npm-user-validate
npm npm-user-validate

03 / CONNECTIONS

Connected vulnerabilities

related SNYK-JAVA-ORGWEBJARSNPM-1019353
related SNYK-JS-NPMUSERVALIDATE-1019352

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2020-7754

This affects the package npm-user-validate before 1.0.1. The regex that validates user emails took exponentially longer to process long input strings beginning with @ characters.

View original source
Open Source Vulnerabilities GHSA-pw54-mh39-w3hc

This affects the package npm-user-validate before 1.0.1. The regex that validates user emails took exponentially longer to process long input strings beginning with @ characters.

View original source
Open Source Vulnerabilities GHSA-xgh6-85xh-479p

`npm-user-validate` before version `1.0.1` is vulnerable to a Regular Expression Denial of Service (REDos). The regex that validates user emails took exponentially longer to process long input strings beginning with `@` characters. ### Impact The issue affects the `email` function. If you use this function to process arbitrary user input with no character limit the application may be susceptible to Denial of Service. ### Patches The issue is patched in version 1.0.1 by improving the regular expression used and also enforcing a 254 character limit. ### Workarounds Restrict the character length to a reasonable degree before passing a value to `.emal()`; Also, consider doing a more rigorous sanitizing/validation beforehand.

View original source

05 / REFERENCES

Further evidence