I'm looking to exploit this preg_replace call:
$str = preg_replace($pattern, '__', $str);
I can control both $str and $pattern variables, but I'm not sure this is enough to inject arbitrary PHP code. Some idea? :)
I'm looking to exploit this preg_replace call:
$str = preg_replace($pattern, '__', $str);
I can control both $str and $pattern variables, but I'm not sure this is enough to inject arbitrary PHP code. Some idea? :)
preg_replace
is only exploitable if the e
modifier is used. This means that the $replacement
string is evaluated as PHP code. Since you provide no way for the $replacement
to be changed by the remote user, it is not vulnerable to exploits.