Server-side
File Upload Vulnerabilities
File upload vulnerabilities allow attackers to upload malicious files (web shells, polyglots, or scripts), leading to RCE, XSS, or path traversal.
- 380 payloads
- 2 files
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
file-upload-payloads.txt
332 payloads · 14 KBLoading payloads for File Upload…
What it is#
File upload vulnerabilities occur when an application allows users to upload files without sufficiently validating type, content, or destination. Attackers exploit these vulnerabilities to upload web shells (leading to RCE), HTML/SVG files (leading to XSS), or use path traversal in filenames to overwrite critical files.
Attack vectors#
- Profile picture upload endpoints
- Document and resume upload features
- Image galleries and media managers
- CMS plugin/theme upload functionality
- Import/export features accepting file uploads
Testing methodology#
- Upload a PHP/ASP/JSP web shell with a changed extension
- Test double extension bypass: shell.php.jpg
- Try null byte injection in filename: shell.php%00.jpg
- Manipulate Content-Type header to bypass MIME type checks
- Test magic byte bypass by prepending a valid image header
- Try SVG file upload with embedded JavaScript for XSS
Indicators of vulnerability#
- Uploaded file accessible at a predictable URL
- PHP/ASP code executed when accessing the uploaded file URL
- JavaScript executed when victim views an uploaded SVG/HTML file
Detection guidance#
Implement server-side content-type validation using magic bytes. Store uploads outside the web root. Monitor upload directories for executable files.
Mitigation and remediation#
- Validate file type using content (magic bytes) not just extension or MIME header
- Use an allowlist of permitted file types and extensions
- Store uploaded files outside the web root
- Rename uploaded files to remove any executable extensions
- Disable script execution in upload directories via server configuration
- Serve uploaded files from a separate cookieless domain
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)