Dangerous File Extensions
PHP
PHP
.php, .php2, .php3, .php4, .php5, .php6, .php7, .phps, .pht, .phtm, .phtml, .pgif, .shtml, .htaccess, .phar, .inc, .hphp, .ctp, .moduleWorking in PHPv8: .php, .php4, .php5, .phtml, .module, .inc, .hphp, .ctpASP
ASP
.asp, .aspx, .config, .ashx, .asmx, .aspq, .axd, .cshtm, .cshtml, .rem, .soap, .vbhtm, .vbhtml, .asa, .cer, .shtmlJSP
JSP
.jsp, .jspx, .jsw, .jsv, .jspf, .wss, .do, .actionOther
Other
Coldfusion:
Perl:
Erlang Yaws:
.cfm, .cfml, .cfc, .dbmPerl:
.pl, .cgiErlang Yaws:
.yawsBypass Extension Checks
Reverse Extension Order
Some Apache misconfigurations execute anything with
.php anywhere in the name:Bypass Content-Type and Magic Bytes
Trailing Dot Bypass (CVE-2024-21546 - UniSharp LFM)
In UniSharp Laravel Filemanager < 2.9.1, uploadingshell.php. causes the server to strip the trailing dot and save shell.php:
ZIP/Archive Attacks
- Symlink in ZIP
- Path Traversal in ZIP
- NUL-Byte Filename Smuggling
- Stacked ZIPs
GZIP Upload + Path Traversal (Tomcat JSP)
uWSGI Configuration File RCE
If you can upload a.ini file to a uWSGI server:
Content-Type Confusion → Arbitrary File Read
Some upload handlers trust parsed request body and copyfile.filepath without enforcing multipart:
wget Filename Truncation Bypass
wget truncates filenames at 236 characters. Name your fileA*232 + ".php" + ".gif" to bypass extension checks while wget saves it as .php:
Polyglot Files
Polyglot files are valid in multiple formats simultaneously (e.g., GIFAR = GIF + RAR). They bypass MIME type checks while containing malicious code.Vulnerability Chaining
Path Traversal
Set filename to
../../../tmp/lol.pngSQL Injection
Set filename to
sleep(10)-- -.jpgXSS
Set filename to
<svg onload=alert(document.domain)>Command Injection
Set filename to
; sleep 10;XXE via SVG
Upload SVG with external entity references
SSRF
Upload files that trigger server-side URL fetches
Magic Header Bytes Reference
Tools
- Upload Bypass — Automated upload bypass testing
- Burp Upload Scanner — Burp extension
- fuxploider — File upload fuzzer