Cyber Risks · PortSwigger Research

Lab: Web shell upload via race condition

Summary: PortSwigger's lab presents an image upload function that validates files robustly, but moves each upload to an accessible folder before the virus check completes, so a malicious file can run in the window before removal. The lab asks the solver to upload a basic PHP web shell and use it to read /home/carlos/secret, logging in as wiener:peter, and notes the window is generous enough to exploit by sending two requests in quick succession via Burp Repeater.

Why it matters: The lab's own framing is that in the wild the window may only be a few milliseconds, which means a scanner that checks files after they land in a web-reachable directory has already handed an attacker the execution window it was meant to close.

Read the original at PortSwigger Research ↗

Topics
Zero-Days & Exploits
Related