-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Description
The following regular expression used for parsing the cookie is vulnerable to ReDoS:
/^(([^=;]+))\s*=\s*([^\n\r\0]*)/
The slowdown is moderately low: for 50.000 characters around 2.5 seconds matching time. However, I would still suggest one of the following:
- remove the regex,
- limit the number of characters that can be matched by the repetition,
- limit the input size.
I noticed there is another bug report regarding the correctness of this regular expression.
If needed, I can provide an actual example showing the slowdown.
grimurd, Ilshidur, g-k, dotLou, tizmagik and 15 more
Metadata
Metadata
Assignees
Labels
No labels