OSV 1.4.0 · github-reviewed · 修改于 2020-10-17 02:56
发布时间
2020-10-17 02:56
GitHub 审查时间
2020-10-17 02:56
NVD 发布时间
—
源文件
advisories/github-reviewed/2020/10/GHSA-xgh6-85xh-479p/GHSA-xgh6-85xh-479p.json
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.
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.
The issue is patched in version 1.0.1 by improving the regular expression used and also enforcing a 254 character limit.
Restrict the character length to a reasonable degree before passing a value to .emal(); Also, consider doing a more rigorous sanitizing/validation beforehand.