Skip to content
goTool Español

Solutions · WordPress

WordPress: a new .php in the root (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 the WordPress root there's /ruta/al/wordpress/x.php, which isn't part of WordPress and wasn't there in the previous check.

Why it matters

A .php in the root can be called directly from outside, bypassing WordPress and its security plugins.

What to do

  1. See what it is without running it (just read it):
    less /ruta/al/wordpress/x.php
  2. 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/x.php ~/gotool-pruebas/
    rm /ruta/al/wordpress/x.php
  3. If it's yours (a maintenance script), move it out of the public folder: anyone can call what's there.
  4. Find out how they got in: plugins with known flaws, the administrators' passwords, and the rest of this project's critical issues in 🛡.

How to know it's fixed

  • It must say it doesn't exist:
    ls -l /ruta/al/wordpress/x.php
  • 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 it has to be there (a Google verification, for example), make it an .html, not a .php.
  • If it's yours and it's like that on purpose, mark it as closed with its reason in the project's 🛡: it stops warning (and warns again if it changes).

More

CWE-506 · 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.

Ask us for a demo