Inefficient Regular Expression Complexity in chocobozzz/peertube

Valid

Reported on

Sep 16th 2021


Description

Hello Again dear Peertube team.

I found inefficient regular expression in that have a Polynomial execution time that can be lead to ReDoS attacks and it is better to replace it with another regex or Use google re2 regex engine for server sides code.

Proof of Concept

I create two payloads that you can compare the execution times between them in Regexr provided links.

payload 1 : normal input

https://regexr.com/65ovu

payload 2 : the crafted bad input with length = payload 1

https://regexr.com/65ovl

Also if you see error from execution time in Regexr.com this means that the execution time is greater that 250 millisecond.

Occurrences

We have contacted a member of the chocobozzz/peertube team and are waiting to hear back 2 years ago
amammad
2 years ago

Researcher


dear puretube team, if you want any more explanation just tell me

chocobozzz validated this vulnerability 2 years ago
amammad has been awarded the disclosure bounty
The fix bounty is now up for grabs
chocobozzz
2 years ago

Maintainer


Thanks, and sorry for the late answer.

chocobozzz marked this as fixed with commit e5d987 2 years ago
chocobozzz has been awarded the fix bounty
This vulnerability will not receive a CVE
oembed.ts#L31 has been validated
to join this conversation