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

File Upload Exploitation

  • SVG file To XSS

  • Open Redirect when uploading svg files

Top Upload reports from HackerOne:

  1. Blind XSS on image upload to CS Money - 412 upvotes, $1000

  2. Unrestricted file upload leads to Stored XSS to Visma Public - 268 upvotes, $250

  3. Arbitrary File Upload to Stored XSS to Visma Public - 245 upvotes, $250

  4. XSS from arbitrary attachment upload. to Qulture.Rocks - 74 upvotes, $0

  5. Open s3 bucket allows for public upload to Augur - 73 upvotes, $100

  6. Stored XSS on upload files leads to steal cookie to Palo Alto Software - 56 upvotes, $0

  7. SSRF in VCARD photo upload functionality to Open-Xchange - 49 upvotes, $850

Last updated

Was this helpful?