-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
The following regular expressions used in underscore and unescapeHTML methods are vulnerable to ReDoS:
/([A-Z\d]+)([A-Z][a-z])/g
/\&([^;]+);/g
The slowdown is moderately low (for 50,000 characters around 2 seconds matching time). I would suggest one of the following:
- remove the regex,
- anchor the regex,
- limit the number of characters that can be matched by the repetition,
- limit the input size.
If needed, I can provide an actual example showing the slowdown.
lgodmer, nicojs, wcea and stefanfuchs
Metadata
Metadata
Assignees
Labels
No labels