Insecure File Upload
Assess an upload feature and learn robust server-side validation and safe storage.
Scenario
An upload feature validates files in the browser but trusts what the client sends. You'll demonstrate that client-side validation is not a control and define proper server-side handling.
Objective
Show that the weak client-side check can be bypassed, then specify the server-side controls that stop it.
Your approach
- Observe how the upload validates type and size.
- Confirm the validation is client-side only.
- Demonstrate that a disallowed file type is accepted by the server.
- Review how and where uploaded files are stored and served.
- Define server-side type/content validation, size limits, randomised names and private storage.
Rules of engagement
Run this lab only in the isolated environment provided — the downloadable bundle runs on your own machine in a private Docker network. Only interact with the lab's target, keep testing non-destructive, and never use these techniques on systems you don't own or aren't authorised to test. When you've met the objective, submit the flag (format SS{...}) to score.
Remediation focus
Validate type by content server-side, enforce size limits, randomise filenames, store outside the web root, scan uploads, and serve them through an access-controlled handler.
Deliverable
Write up what you did, what you observed, the business impact, and a clear remediation — exactly as you would in a professional report.
Hints
Hint 1
Re-read the matching knowledge-base entry before you start.
Hint 2
Capture reproducible evidence as you go — you'll need it for the write-up.
Hint 3
For every finding, identify the single control that would prevent it.
Study the theory
Read the Insecure File Upload knowledge-base entry