Regular Expression Denial of Service in npm-user-validate
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
`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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | npm-user-validate (npm) | before 1.0.1 | 1.0.1 | Patch available | GHSA-xgh6-85xh-479p |
- npm-user-validate (npm) Vendor— Affected before 1.0.1 Fixed in 1.0.1 Patch available GHSA-xgh6-85xh-479p
Remediation
- Fix · GHSA-xgh6-85xh-479p npm-user-validate (npm) Fixed in 1.0.1 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-xgh6-85xh-479p
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences