-
Notifications
You must be signed in to change notification settings - Fork 881
Closed
Description
The following regular expression used for parsing the user agent is vulnerable to ReDoS:
/Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/i
The slowdown is moderate: for 50.000 characters around 10 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.
Metadata
Metadata
Assignees
Labels
No labels