Message376343
I find this regex "(\d+\.\d+\.\d+)(\w+\d+)?$" may be stucked by input.
The vulnerable regex is located in
https://github.com/python/cpython/blob/54a66ade2067c373d31003ad260e1b7d14c81564/Tools/msi/purge.py#L15
The ReDOS vulnerability of the regex is mainly due to the sub-pattern \w+\d+
and can be exploited with the following string
"1.1.1"+"1" * 5000 + "!"
I think you can limit the input length or fix this regex.
For example, you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+
Looking forward for your response!
Best,
Yeting Li |
|
Date |
User |
Action |
Args |
2020-09-04 09:47:22 | yetingli | set | recipients:
+ yetingli |
2020-09-04 09:47:22 | yetingli | set | messageid: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> |
2020-09-04 09:47:22 | yetingli | link | issue41712 messages |
2020-09-04 09:47:22 | yetingli | create | |
|