
The ability to trigger arbitrary code execution from one machine on another is often referred to as remote code execution. Most of these vulnerabilities allow the execution of machine code and most exploits therefore inject and execute shellcode to give an attacker an easy way to manually run arbitrary commands.

A program that is designed to exploit such vulnerability is called an arbitrary code execution exploit. It is commonly used in arbitrary code execution vulnerability to describe a software bug that gives an attacker a way to execute arbitrary code. More on ' arbitrary code execution': Arbitrary code execution is used to describe an attacker's ability to execute any commands of the attacker's choice on a target machine or in a target process. The curl_exec function is considered to be secure enough for the web servers as it doesn't directly run those commands, which are essential for your scripts to work. It'd be of no problems as long as you run them on your own server/sites without such restrictions, ie: if you're not going to host client sites, who in turn would take this positively to execute such arbitrary code, causing damage to the entire server.

The exec function is considered to pose threats on the servers & often blocked by system admins on shared hosting ones. Forgive me for being stupid or naive, but will curl_exec() achieve the same results as exec() for the command that is being passed through it? curl_exec() would need some modifications over to achieve what exec() does.
