Lab: Web shell upload via extension blacklist bypass
Summary: PortSwigger's lab presents an image upload function that blacklists certain file extensions, but the blacklist can be bypassed because of a flaw in how it is configured. The exercise requires uploading a basic PHP web shell and a second file containing an Apache directive that maps an arbitrary extension (.l33t) to the executable MIME type application/x-httpd-php, then using the shell to exfiltrate the contents of /home/carlos/secret.
Bottom line: The bypass does not defeat the blacklist by finding a missing extension; it abuses the server's own mod_php configuration to make an arbitrary extension executable, so a control that only checks file names leaves the upload path open.
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