-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
Description
Describe the bug
We are working on the ReDoS problem and detected a vulnerable regex from your code.
Regex \001?\033\\]((?:.|;)*?)(\x07)\002? in link takes forever to match the string
"\u001B];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
This is because two branches in (?:.|;) can both match the character ;, we suggest you to just remove the later one.
We didn’t create a pull request because we're not sure if these cases are possible to take place in your program, we also do not understand the functionality of the regex as you do. Thank you for your understanding.