Check the PHP version and patch level: Linux, Windows/IIS, Plesk, cPanel, Docker
Whether a website is affected by a vulnerability such as PHP2Shell depends on the PHP version it runs on – more precisely: on its patch level. Here is how to check on common systems, from a quick look from outside to verifying whether your distribution has backported the fix.
- Safe are at least 8.6.0 · 8.5.13 · 8.4.28 · 8.3.37 · 8.2.36. PHP 8.1 and older no longer get official updates.
php -vonly shows the command-line version – the web server may use another one.phpinfo()is the most reliable.- Debian, Ubuntu and RHEL often patch without changing the version number – then search the package changelog for the CVE number.
1. From outside with PHPCheck.net
Many servers reveal their PHP version in the HTTP header X-Powered-By, e.g. X-Powered-By: PHP/8.3.20.
PHPCheck.net reads this header and rates the version. If it is hidden – which is recommended
(disable expose_php) – use one of the methods below.
2. With a phpinfo() file (all systems)
The most reliable way to see the version your website actually runs on:
- Create a file with a random name, e.g.
info-7f3k9.php:<?php phpinfo(); - Upload it via FTP to the website's root folder and open it in the browser. The version is shown at the top, the mode under "Server API" (FPM, CGI, Apache module).
- Delete the file afterwards – it reveals a lot of details to attackers.
3. Debian and Ubuntu
php -v # command line
ls /etc/php/ # installed branches
systemctl list-units 'php*-fpm*' # running PHP-FPM services
dpkg -l | grep -E '^ii\s+php[0-9.]+-(fpm|cli|common)' # exact package versions
Check for backports: Debian and Ubuntu often apply security fixes to their own package version (e.g. 8.2.29-1~deb12u3).
Whether the fix is included is listed in the changelog:
apt changelog php8.2-fpm | grep -m3 -E 'CVE-2026-10961[89]'
# or: zcat /usr/share/doc/php8.2-fpm/changelog.Debian.gz | grep CVE-2026-10961
Packages from packages.sury.org (Ondřej Surý), on the other hand, follow the official PHP versions directly.
4. RHEL, AlmaLinux, Rocky Linux, CentOS
php -v
rpm -qa | grep -E '^php(-fpm|-cli|-common)?-[0-9]'
dnf module list php # active version stream
rpm -q --changelog php-fpm | grep -m3 CVE-2026-10961 # check for backports
If the server uses the Remi repository (php83-php-fpm or similar), the binary is e.g. /opt/remi/php83/root/usr/bin/php.
5. Windows and IIS
& "C:\Program Files\PHP\v8.3\php.exe" -v # adjust the path
Get-ChildItem C:\ -Filter php.exe -Recurse -ErrorAction SilentlyContinue | ForEach-Object { & $_.FullName -v | Select-Object -First 1 }
Which php-cgi.exe a website uses is shown in IIS Manager under Handler Mappings (entry "PHP_via_FastCGI")
or in applicationHost.config under <fastCgi>. Windows builds come directly from php.net – there are no backports, so the version number is conclusive.
6. Plesk, cPanel and hosting panels
- Plesk: domain → PHP shows the version; via SSH:
plesk bin php_handler --list. Plesk packages are calledplesk-php83etc. and are patched via Plesk updates. - cPanel/WHM: Software → MultiPHP Manager; via SSH:
/opt/cpanel/ea-php83/root/usr/bin/php -v. - Shared hosting: version in the customer area – see Change the PHP version at IONOS, STRATO, ALL-INKL and Hetzner. The host applies the patches; ask support if in doubt.
7. Docker and containers
docker ps --format '{{.Names}}\t{{.Image}}' # images in use
docker exec <container> php -v
docker image inspect <image> --format '{{index .Config.Env}}' | tr ' ' '\n' | grep PHP_VERSION
An image does not update itself: after a PHP security release run docker pull and recreate the container (or rebuild your own image).
8. In WordPress
Under Tools → Site Health → Info → Server you will find the PHP version WordPress runs on.
What next?
Compare the version with our table PHP versions and end of life. If it is older than the safe patch release and your distribution has not backported the fix: update soon – see Update PHP.