Skip to content
MEDIA IT SOFT
Engineering 3 min read

Securing file uploads in a CMS

CVs, artwork and documents are the most commonly exploited part of any content-managed site. A practical checklist.

JW By James Whitfield
Securing file uploads in a CMS

Applicant CVs are personally identifiable information and often the weakest link in a recruitment workflow. Treat them as private data, not uploads.

The checklist

  • Validate MIME type and extension server-side, never trust the client
  • Randomise filenames; never derive paths from user input
  • Store on a private disk with no public URL
  • Serve downloads through an authorising controller, and log every access
  • Set size limits and rate-limit the endpoint

Also sanitise rich text on write and again on render. HTMLPurifier with an allowlist is unglamorous and effective.

Related articles

Engineering 3 min read

What we look for when hiring engineers

Not leetcode. We care about how you reason about trade-offs, communicate uncertainty and handle being wrong.

Read article

Ready to build something exceptional?

Tell us about your project and we will come back with a clear plan.