A file upload feature creates a direct path from the public internet into your storage and processing systems. Most teams review the form field and the file size, then move on. The failures that matter usually sit around the upload: who may retrieve the file, where it is stored, what happens when it is opened, and how long it is kept.
This checklist is written for product owners, developers and operations staff who need a design review they can actually complete. Each group names the control, the evidence to keep and the person who should own it.
Define the upload contract first
Before writing validation rules, write the business contract. Who is allowed to upload, what file types are genuinely needed, what is the maximum size, who may download, how long is the file retained, and what should happen when a scan fails? A design that cannot answer those questions will accumulate exceptions.
Checklist: policy and permissions
- Allow-list file types by business need — evidence: approved type list; owner: product.
- Separate upload permission from download permission — evidence: role matrix; owner: product and security.
- Require authentication for private files — evidence: access test; owner: engineering.
- Scope every file lookup to the tenant and owner — evidence: cross-tenant test; owner: engineering.
- Use short-lived signed URLs for temporary access — evidence: expiry test; owner: engineering.
- Generate filenames on the server — evidence: code review; owner: engineering.
Checklist: validation
- Do not trust the browser Content-Type — evidence: spoofed upload test; owner: engineering.
- Verify the file signature, not only the extension — evidence: test results; owner: engineering.
- Reject double extensions and executable types — evidence: test cases; owner: engineering.
- Enforce size limits at the edge and in the application — evidence: configuration and test; owner: operations.
- Re-encode images and strip metadata — evidence: sample output; owner: engineering.
- Reject archives or inspect them safely — evidence: policy and scan report; owner: security.
Checklist: storage and processing
- Store uploads outside the web root or in a private bucket — evidence: bucket policy; owner: operations.
- Keep new uploads in quarantine until scanning completes — evidence: workflow diagram; owner: engineering.
- Scan for malware with an engine you update — evidence: scan logs; owner: operations.
- Run processing in a sandbox with no credentials — evidence: job configuration; owner: engineering.
- Apply encryption at rest and in transit — evidence: storage and TLS settings; owner: operations.
- Version or hash files for integrity — evidence: stored hash; owner: engineering.
Checklist: delivery and retention
- Serve files through the application or a controlled CDN — evidence: route configuration; owner: engineering.
- Set Content-Disposition and a safe content type on download — evidence: response headers; owner: engineering.
- Prevent inline rendering of risky formats — evidence: browser test; owner: security.
- Record uploader, timestamp, hash, scan result and access — evidence: log sample; owner: operations.
- Delete files on a defined retention schedule — evidence: deletion report; owner: data owner.
- Honour deletion requests across backups — evidence: runbook; owner: operations.
Evidence to keep
Keep the approved file-type list, the role matrix, the scan configuration, a sample of scan and access logs, the retention schedule and the latest test results. Store them with the application documentation rather than in a personal drive. During an audit or an incident, the evidence is what turns a design claim into a verifiable control. A short index of where each item lives also gives a new administrator a sensible place to start.
Verification tests
- Upload a text file renamed with an image extension and confirm rejection.
- Upload an image with an appended script and confirm the file is re-encoded or rejected.
- Attempt to download another tenant's file by changing the identifier.
- Use an expired signed URL and confirm access is denied.
- Upload a file above the limit and confirm a clear error without a server path.
- Place a test malware sample in staging and confirm quarantine and alerting.
- Delete a file and confirm removal from storage, search and the retention report.
- Review logs for one upload from start to finish and confirm every step is traceable.
A design review agenda
- Walk through one real upload as a user, an approver and an administrator.
- Show where the file is stored before and after scanning.
- Demonstrate a download by the owner, a colleague and a user from another tenant.
- Show the retention job and the evidence it produces.
- Read the last incident review for the upload path, or confirm that none exists.
Thirty minutes with those five items reveals more than a policy document. If the team cannot show the file at each step, the design is not yet understood well enough to operate.
Common mistakes
- Blocking dangerous extensions but allowing the same content under a different type.
- Storing files in a public folder because the application server was easier to configure.
- Trusting a virus scan that runs after the file is already downloadable.
- Logging the file path but not the user or the tenant.
- Letting support staff download any file without a recorded reason.
- Keeping uploads forever because nobody owns retention.
Where this fits in our work
If you need the upload path reviewed or hardened, start with Managed Technology and Cybersecurity. The pricing page explains how assessment and remediation are scoped. For the recovery side of a related incident, read the malware cleanup prevention checklist.
Sources
- OWASP Cheat Sheet Series, File Upload, accessed 17 November 2026.
- MITRE CWE-434, Unrestricted Upload of File with Dangerous Type, accessed 17 November 2026.
- OWASP Application Security Verification Standard, accessed 17 November 2026.
- IANA, Media Types, accessed 17 November 2026.
Responses (0)
No comments yet. Add the first one below.
Leave a response
Your email address will not be published. Required fields are marked *.