checklists

File Upload Testing Checklist.

File Management A thorough checklist for testing file upload features: happy-path flows, file-type and size validation, filename edge cases, multiple uploads, preview/download/delete, error handling, security (including malware and injection vectors), and accessibility.

8
sections
36
items
2–3 hours
time
QA engineersSDETsAutomation engineersSecurity engineers

When to use this checklist

  • Before releasing a new file upload or attachment feature
  • When adding a new file type or size limit to an existing upload component
  • After migrating file storage backends (e.g., local disk to S3 or GCS)
  • As part of a security review for any feature that accepts user-provided files
  • When upgrading the file upload library or multipart handling middleware

File upload is a deceptively complex feature. It sits at the intersection of frontend UX (drag-and-drop, progress indicators, previews), backend validation (type, size, filename sanitization), storage infrastructure (presigned URLs, CDN caching), and security (malware upload, path traversal, polyglot files). This checklist covers the full lifecycle: happy-path upload, every validation boundary, filename edge cases, multi-file flows, preview and download, deletion, error handling, permissions, and the OWASP-relevant security checks specific to file upload surfaces.

0/36

Upload Flow (Happy Path)

0/5

Verify the end-to-end upload flow works correctly for a standard, valid file.

File Type Validation

0/5

Confirm that allowed and disallowed file types are correctly enforced server-side, not only via the UI.

File Size Validation

0/4

Verify size limits are enforced at every layer (UI, server, and storage gateway).

Filename Handling

0/4

Test that the server handles special, long, and malicious filenames safely without exposing path traversal or injection risks.

Multiple File Uploads

0/4

Verify that the multi-file upload flow handles partial failures, limits, and concurrent uploads correctly.

Preview, Download & Delete

0/5

Verify that uploaded files can be previewed, downloaded with correct headers, and deleted cleanly.

Security

0/5

Test for the upload-specific security vulnerabilities defined in the OWASP File Upload cheat sheet.

Accessibility & Error Handling

0/4

Verify the upload component is accessible to all users and surfaces errors clearly.

Common Bugs

File type check trusts the Content-Type header — bypassed by renaming a PHP file to .jpg

The server validates the MIME type from the client-provided Content-Type header or the file extension. An attacker renames malware.php to photo.jpg and the file passes validation. Always validate file type from the actual file signature (magic bytes), independent of the extension or header.

Download URL is publicly accessible — private files readable by anyone with the URL

Files are stored in a public S3 bucket or web-accessible directory. The URL is guessable or was shared. Unauthenticated users can download private documents by knowing (or brute-forcing) the URL. Always use presigned URLs with short expiry or proxy downloads through an authenticated endpoint.

Uploaded SVG files execute embedded JavaScript when displayed inline

SVG files containing <script> tags are accepted, stored, and served as image/svg+xml. When another user views the image page, the script executes in their browser — a stored XSS vulnerability. Either block SVG uploads or sanitize all SVG content (remove script, foreignObject, and event handlers) before storage.

Duplicate filename silently overwrites an existing file

User A uploads report.pdf. User B also uploads a file named report.pdf to the same shared context. User B's file silently overwrites User A's. User A's document is permanently gone. Always use server-generated unique keys (UUID + extension) for storage paths, independent of the user-provided filename.

EXIF GPS data leaks user location via uploaded photos

A user uploads a photo taken on a smartphone. The photo contains EXIF metadata with precise GPS coordinates of their home address. The file is served to all users with the metadata intact. Strip all EXIF data server-side before storing or serving any uploaded image.

Recommended Tools

Cypress

cy.selectFile() simulates file selection for upload flows. cy.intercept() lets you mock the upload API to test progress states, errors, and partial failures without hitting real storage.

Playwright

page.setInputFiles() supports single and multi-file uploads, including drag-and-drop simulation. Use page.route() to intercept upload requests and test error handling.

OWASP ZAP

Scans for file upload security vulnerabilities including path traversal in filenames, missing Content-Disposition headers, and unrestricted file upload endpoints.

Burp Suite

Intercept multipart upload requests to test bypassing frontend file-type validation, inject path traversal sequences in the filename field, and replay requests with modified content.

Postman

Test the file upload API directly with different file types, sizes, and malformed multipart bodies without going through the UI. Essential for verifying server-side validation is independent of the frontend.