PHP2Shell.fyi Check a site

phpMyAdmin and PHP2Shell

phpMyAdmin runs on PHP, and PHP2Shell is two serious flaws in PHP itself. Updating phpMyAdmin does not fix them. Update PHP on the server, then restart PHP.

Last reviewed . Rules of .

What to do

  1. Find the PHP version that serves your site (see below).
  2. Update PHP to a fixed release in your current branch: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Later releases in the same branch also work.
  3. Restart PHP-FPM or your web server.
  4. If your host runs PHP for you, ask them to do this and to confirm the version.

Fix this too: a database admin panel open to the internet. Anyone who reaches phpMyAdmin can try to log in to your database. This is a separate problem from PHP2Shell.

Our advice: allow access only from known IP addresses or through a VPN, whatever your PHP version. See Restrict access.

What the checker can see

The checker reads only the URL you submit, plus redirects on the same site. For phpMyAdmin it looks for:

The checker reads cookie names, never their values. It does not look for phpMyAdmin at other paths on your server, so submit the phpMyAdmin URL itself to check it. The PHP2Shell result depends on the PHP version alone.

Where to see the PHP version

After you log in, the phpMyAdmin main page shows detailed server information. The setting for this is $cfg['ShowServerInfo'], and it is on by default. If the page does not show the PHP version, check on the server or ask your host.

Supported PHP versions

phpMyAdmin data from phpmyadmin.net/downloads and the phpMyAdmin 5.2.3 composer.json. Fixed releases from php.net.
phpMyAdminStatusPHP rangeFixed PHP releases in range
5.2Stable (latest 5.2.3, 8 October 2025)7.2 or later8.2.35, 8.3.36, 8.4.27, 8.5.12
4.9Long-term support, security fixes only5.5 or later, below 8.0None from the PHP project

How to update PHP

Restrict access

Our advice is to keep phpMyAdmin off the open internet. Allow only known IP addresses, or put it behind a VPN. In nginx, for example:

location ^~ /phpmyadmin/ {
    allow 203.0.113.10;
    deny all;
    # Put the PHP handler inside this block. With ^~, nginx does not use
    # the site-wide "location ~ \.php$" block, which would skip allow/deny.
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

Then test it. From an address that is not on the list, request /phpmyadmin/index.php. The answer must be 403 Forbidden.

In Apache:

<Location "/phpmyadmin">
    Require ip 203.0.113.10
</Location>

Use your own path and addresses. Among other steps, the phpMyAdmin documentation also recommends these:

Notes

Sources

Check your site

The checker reads one ordinary page at the URL you submit and shows the public PHP signals it found. It sends no attack traffic.

Check my site