GHSA-xgh6-85xh-479p – npm-user-validate
Package
Manager: npm
Name: npm-user-validate
Vulnerable Version: >=0 <1.0.1
Severity
Level: Low
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:U/RL:O/RC:R
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
Regular Expression Denial of Service in npm-user-validate `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.
Metadata
Created: 2020-10-16T18:56:26Z
Modified: 2020-10-16T18:56:02Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/10/GHSA-xgh6-85xh-479p/GHSA-xgh6-85xh-479p.json
CWE IDs: []
Alternative ID: N/A
Finding: F211
Auto approve: 1