OWASP File Upload Cheat Sheet
Official docs outline
10 sections- File Upload Threats
Malicious files, webshells and public file retrieval risks.
- Extension Validation
Allow-listing extensions and handling double extensions.
- Content-Type Validation
Why client-supplied Content-Type cannot be trusted.
- File Signature Validation
Magic byte checks.
- Filename Safety
Renaming files and preventing path traversal.
- File Content Validation
Image rewriting, malware scanning and CDR.
- File Storage Location
Storing outside the webroot or on separate hosts.
- User Permissions
Authentication and authorization for uploads.
- Filesystem Permissions
Least-privilege storage and non-executable directories.
- Upload and Download Limits
Size and rate limits to prevent denial of service.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.
More in OWASP
All 33- OWASP Cryptographic Storage Cheat Sheets
- OWASP CSRF Prevention Cheat Sheet
-
OWASP Dependency-Check
- OWASP Deserialization Cheat Sheet
- OWASP Django Security Cheat Sheets
- OWASP Docker Security Cheat Sheet
- OWASP GraphQL Cheat Sheet
- OWASP Injection Prevention Cheat Sheets
- OWASP Input Validation Cheat Sheets
- OWASP Kubernetes Security Cheat Sheet
- OWASP Language and Framework Cheat Sheets
- OWASP Logging Cheat Sheets