Unvalidated upload leads to RCE
- Asset
- app.example.com — /perfil/avatar
- Impact
- Remote code execution on the application server; access to the database and to other services' credentials.
- Fix
- Validate the real file type, serve outside the webroot and remove execute permission.
# sends a webshell disguised as an image POST /perfil/avatar HTTP/2 Content-Type: image/png; name="x.php" HTTP/2 200 OK # and then, on the server: GET /uploads/x.php?cmd=id → uid=33(www-data)

