regexploit
regexploit copied to clipboard
Can't parse atomic groups
I was scanning a bunch of regular expressions with some of them containing atomic groups. Every expression containing an atomic group triggered a parsing error indicating that ?> is an unknown extension
. Is this desired behavior by regexploit
or will they be supported in further versions?
Hi, this affects me as well. I would love to see this working.
Atomic groups currently aren't supported. I should probably make that explicit in the documentation. Atomic groups are not available in python's regular expression engine but regexploit could add some support for them.
It will be difficult to adapt the heuristic to handle them accurately, but we can start with an approximation of their behaviour with some false positives. Or begin by treating them like non-atomic groups but not causing an error. Not ideal.
While I can imagine some pathological regexes, do you have any real-world examples of ReDoS involving atomic groups?
Atomic groups are not available in python's regular expression engine
They are supported from Python 3.11 onwards (scroll down to the (?>...)
section), released on Oct 24, 2022.