Solutions · WordPress
WordPress: code in uploads (x.php)
With example names (mi-app, /ruta/al/proyecto). In GoTool, in 🛡 Security, this page shows your project's: your container, your compose file, your WordPress folder.
What's happening
In wp-content/uploads/ there's /ruta/al/wordpress/wp-content/uploads/2026/01/x.php, a file the server can execute.
Why it matters
Uploads should only hold the images and documents people upload. An executable file there is what someone exploiting a form or a flawed plugin leaves behind.
What to do
- If it isn't anyone on the team's, keep it as evidence and delete it:
mkdir -p ~/gotool-pruebas && cp -a /ruta/al/wordpress/wp-content/uploads/2026/01/x.php ~/gotool-pruebas/ rm /ruta/al/wordpress/wp-content/uploads/2026/01/x.php - Make sure PHP can't run in uploads. In nginx:
location ~* /wp-content/uploads/.*\.(php|phtml|phar)$ { deny all; } - Or in Apache, an .htaccess inside uploads:
<FilesMatch "\.(php|phtml|phar)$"> Require all denied </FilesMatch> - Look in the access log for who requested it and from where (gotool reports it in Security, on the server).
How to know it's fixed
- Nothing must show up:
find /ruta/al/wordpress/wp-content/uploads -type f \( -name '*.php' -o -name '*.phtml' -o -name '*.phar' \) - gotool checks the WordPress again on its next pass: once it's gone, it stops showing up.
If you can't do it that way
- If a plugin keeps its .php there (some cache or backup plugins), replace it with one that doesn't, or that keeps them in a blocked folder.
More
CWE-434 · MITRE ATT&CK T1505.003
In GoTool, the file with the issue (the Dockerfile, the compose file) is also shown with the solution next to it, and the question for Claude comes ready, with your project's details and without your keys, to paste into your claude.ai.