File-Upload

File extension

# extension blacklisted:
PHP: .phtm, phtml, .phps, .pht, .php2, .php3, .php4, .php5, .shtml, .phar, .pgif, .inc
ASP: .asp, .aspx, .cer, .asa
Jsp: .jsp, .jspx, .jsw, .jsv, .jspf
Coldfusion: .cfm, .cfml, .cfc, .dbm
Using random capitalization: .pHp, .pHP5, .PhAr
pht,phpt,phtml,php3,php4,php5,php6,php7,phar,pgif,phtm,phps,shtml,phar,pgif,inc
# extension whitelisted:
file.jpg.php
file.php.jpg
file.php.blah123jpg
file.php%00.jpg
file.php\\x00.jpg
file.php%00
file.php%20
file.php%0d%0a.jpg
file.php.....
file.php/
file.php.\\
file.
.html

Payloads

Content type

Content length

Impact by extension

File name

Other Test Cases

Web shell upload via extension blacklist bypassarrow-up-right [Overriding the server configuration]

Remote code execution via polyglot web shell uploadarrow-up-right

File Upload Exploitation

SVG file To XSS

Open Redirect when uploading svg files

Top Upload reports from HackerOne:

  1. Blind XSS on image uploadarrow-up-right to CS Money - 412 upvotes, $1000

  2. Arbitrary File Upload to Stored XSSarrow-up-right to Visma Public - 245 upvotes, $250

  3. XSS from arbitrary attachment upload.arrow-up-right to Qulture.Rocks - 74 upvotes, $0

Last updated