Check reference

Executable files in uploads

What it checks

Looks for .php, .phtml and other executable files in wp-content/uploads, where only media should be stored.

Check ID: env.uploads_php

All of wp-content/uploads is searched for files with these extensions: .php, .phtml, .php3 to .php8, .phar, .pht, .phps, .shtml, .cgi, .pl, .py, .asp, .aspx and .jsp.

A small index.php that contains only a comment (used to hide the folder contents) is not reported. .git and node_modules folders are skipped. The uploads folder does not need to be selected as a scan target.

What a finding means

The titles, severities and explanations below are the ones shown on the Findings screen.

FindingSeverityMeaning
PHP file in uploads / Executable file in uploads
uploads.executable
Critical HighThe uploads directory should only contain media. Executable files here are a common sign of a compromised site or of an insecure upload form.
Critical: PHP files. High: other executable files.
Uploads directory could not be read
uploads.unreadable
Info(The reason is shown with the finding.)

How to fix

The recommended action shown with each finding:

  • PHP file in uploads / Executable file in uploads
    Inspect the file and delete it if it is not required. Also block PHP execution in uploads with server configuration.
  • Uploads directory could not be read
    Check the permissions of wp-content/uploads.

Related settings

  • Settings → Checks → Enabled checks: switch “Executable files in uploads” on or off.