Hello everybody.
Tell me, please, what is the vulnerability of the php code below. As I understand it, an attacker can get the values ​​of all variables in the code (including global ones). Does this code have the ability to execute arbitrary code?
Thanks in advance for the answers.
SOURCE:
<? $user_input = str_replace(array("\\","'", '"'), "", $_GET["user_input"]); eval("echo(\"$user_input\");"); ?>
UPDATE: Good people gave an example of quotation bypass. for example, pass as templateTitle {$ {phpinfo ()}} and other tasty interesting functions. I don't quite understand why braces help to bypass filtering. Probably it is necessary to go to read.
eval
from evil (JSON doesn’t count :)) and you will be happy - Zowie