Lab: Web shell upload via Content-Type restriction bypass
Summary: This PortSwigger lab presents an image upload function that tries to block unexpected file types but relies on checking user-controllable input to do so. The task is to upload a basic PHP web shell and use it to exfiltrate the contents of /home/carlos/secret, logging in with the credentials wiener:peter.
What you should know: The upload control fails because it trusts a value the attacker supplies, so a file that looks like an image to the check still runs as a PHP web shell and reaches /home/carlos/secret.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026