Restrict execution of uploaded files

SEC-015 / v1.0.0 / 2026-10-09

Editorial inspection guidance. Start with read-only permissions; fixes, credential revocation, and production changes follow the owner’s authorization.

Read-only review example

For this kind of environment

An application accepts files and stores, serves, or processes them.

First read
Read the configuration from upload entry through storage and processing.
Where to look
  • Handling of permitted formats and sizes.
  • Separation of storage, serving, and execution.
  • Processor identity and stored-file permissions.
Evidence to retain
Record where accepted input is stored and which identities can read or execute it.
What this does not establish
Extensions and Content-Type alone do not establish content safety. Do not upload executable probes to production.

Applicability

Services that upload, ingest, store, or serve files.

Read the incidents behind this rule (6)
Rule on GitHub ↗

Where to look first

  • Upload storage, serving configuration, executable handlers, and processing-account privileges.

Inspection steps

  1. Compare configuration and architecture to check whether upload storage overlaps application or code deployment paths.
  2. Identify paths that could execute stored files and privileges reaching other environments.
  3. Review tests from an owner-authorized environment. Without evidence, mark unverified; do not submit attack files to production.

Remediation direction

  • Separate storage and serving from code execution; remove executable handlers and unnecessary privileges.

Evidence required for completion

  • Record configuration and test evidence of denied execution and successful normal storage and serving.

Limits and unverified scope

  • Filename restrictions alone do not prove non-execution. Review image-processing and conversion-library vulnerabilities separately.
  • This link is inspection guidance; it does not establish uploads as the intrusion cause.

Read this in context