Cyber Risks · PortSwigger Research

Lab: Remote code execution via web shell upload

Summary: PortSwigger's lab presents an image upload function that performs no validation on uploaded files before storing them on the server's filesystem. Solving it requires uploading a basic PHP web shell and using it to exfiltrate the contents of /home/carlos/secret.

Why it matters: An upload feature that stores user files without validation turns a routine function into remote code execution - the lab's path from a PHP file to another user's secret file is the same path an attacker would take on a production server.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related