New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReDoS in printf #31
Comments
Thank you for reporting this issue, did you look for a solution ? |
Maybe a simple solution is to limit the length of the format? Or you can use the In addition, the regular expression is vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups If you want to modify the regular expression, I can try to fix it. |
I was going in the direction of modifying the regular expression. Please try to do it, I don't have much time at the moment, and write tests to back it. |
Hi, the fixed regular expression is equivalent to the previous one, and the matching speed is much improved compared to before. If you have time, you can provide some test cases. Maybe I can get a more efficient regular expression based on these test cases. |
You can look at the following table to compare the matching speed of the two regular expressions.
|
Hi,
I would like to report two Regular Expression Denial of Service (REDoS) vulnerability in
printf
.It allows cause a denial of service when using crafted invalid formats.
You can execute the code below to reproduce the vulnerability.
Feel free to contact me if you have any questions.
Best regards,
Yeting Li
The text was updated successfully, but these errors were encountered: