InQuest / iocextract

Defanged Indicator of Compromise (IOC) Extractor.
https://inquest.readthedocs.io/projects/iocextract/
GNU General Public License v2.0
498 stars 91 forks source link

catastrophic backtracking in BACKSLASH_URL_RE #52

Closed DaveCrim closed 1 year ago

DaveCrim commented 2 years ago

Pretty much the title, discovered this in a downstream project, https://github.com/s0md3v/Photon, commented on it there as well. Thought I'd leave the comment here too, the rest of the defang RE seem to work fine, but the backslash one seemed to cause a lot of hangs when I was using it.

Test against: http://myexample.com/dir/../path/escaping/../too/many/../dots/../in/../the/path/../cause/this/to/fail

battleoverflow commented 1 year ago

Hi, @DaveCrim!

PR just merged to resolve this issue. I'll ping this issue once more when a new package is available on PyPI for download.

battleoverflow commented 1 year ago

The new PyPI package is now available!

PyPI: https://pypi.org/project/iocextract/1.13.8/ GitHub Releases: https://github.com/InQuest/python-iocextract/releases/tag/v1.13.8