
Remote code execution is a flaw that lets someone who is not at the computer run commands of their choosing on it. The attacker sends input over the network. The vulnerable program treats that input as instructions and runs them.
A Server-Side Request Forgery (SSRF) is a different flaw. The attacker chooses a request the server will make. That request becomes code execution only when the service it reaches can be made to run the attacker’s instructions.
What the Attacker Gains
- A command. The attacker’s input runs as a program or as a statement the program evaluates.
- The program’s privileges. The commands run as the user the vulnerable program already runs as.
- No local seat. The attacker does not need a keyboard on that machine. The network path is enough.
Running Commands and Making a Request
| Compared | Code Execution | A Forged Server Request |
| What the attacker supplies | Instructions the program runs | The address of a request the server will make |
| Direct result | A command runs on the computer | The server fetches or posts to the chosen address |
| When it becomes the other | Already running commands | Only if the reached service can be made to run instructions |