Closed
Description
Good night!
I found that this regex is vulnerable to Regular Expression Denial of Service.
PoC:
>>> from py._path.svnurl import InfoSvnCommand
>>> payl = " 2256 hpk 165 Nov 24 17:55 __init__.py" + " " * 5000
>>> InfoSvnCommand(payl)
Attack vector:
An user accessing a (possibly remote) subversion repository that provides malicious "info" data.
Or an attacker injecting 'svn ls http://...' output (less realistic).
Fix:
Use a pattern with non-overlapping groups. I can help in finding a better regex and testing if needed.
Metadata
Metadata
Assignees
Labels
No labels