Burnt & Toast

From the studio

PHP2Shell: how to check
your website is patched

Two critical PHP flaws were fixed on 21 October 2026. Here’s how to find your site’s PHP version, a free check that tells you if it’s patched, and an email to send your host.

On 21 October 2026 the PHP project released security updates for two critical flaws in PHP, the software that runs behind a large share of the web. They’re known as “PHP2Shell” and tracked as CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 out of 10 (CVSS v4.0).

Try the free PHP2Shell check

In plain terms, a specially crafted request to your website could let an attacker run their own code on the server without logging in. That could mean a crashed site, exposed data, or a server taken over.

The flaws are in PHP itself, not in your website’s code. Updating WordPress, a theme or your plugins doesn’t fix this. The PHP software on your server has to be updated. If your hosting company manages PHP for you (most shared hosting works this way), the update is their job, but it’s worth checking it has been done. This page shows you how, and gives you a free check you can run yourself.

Who is affected

  • PHP says all PHP installations serving web requests are at risk. That includes PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP rates the risk highest for mod_php.
  • WordPress, Drupal and Joomla all run on PHP, so sites built on them are in scope until the server’s PHP is updated. So are many other PHP-based tools, such as shop software and booking systems.
  • Cloudflare, which worked on the coordinated response, says the flaws affect all web servers running PHP 5.4 or later.
  • The UK’s National Cyber Security Centre (NCSC) has asked UK organisations to take action.

As of 22 October, New Zealand’s national cyber security centre said it was aware of reports of active exploitation, and Cloudflare reported seeing attack traffic. The US agency CISA hadn’t seen exploitation when it published its alert on 21 October.

The version you need

You’re looking for your site’s full PHP version number, with three parts, for example 8.3.36. Compare it with this table.

you’re patched if your version is…*

  • 8.5: 8.5.12 or later
  • 8.4: 8.4.27 or later
  • 8.3: 8.3.36 or later
  • 8.2: 8.2.35 or later
  • 8.1, 8.0, 7.x or older: the PHP project no longer releases updates for these. See below.

* PHP 8.6 is still in testing. Its fix is in 8.6.0RC4 and later test releases, and test releases shouldn’t run a live website.

A few things to know before you relax or worry:

  • A lower number doesn’t always mean you’re exposed. Linux distributions and long-term support vendors often add the fix to older-looking version numbers (“backporting”). If your number is below the one in the table and has extra text after it, such as 8.3.6-0ubuntu0.24.04.5, ask your host whether they’ve applied the fix before you assume the worst.
  • PHP 8.1 and older get no new releases from the PHP project. Its security team did publish minimal source fixes for 7.4, 8.0 and 8.1, for people who build PHP from source or don’t have a long-term support vendor. The lasting answer is moving to a supported version.
  • PHP 8.2 reaches end of life on 31 December 2026. If you’re on 8.2, it’s a good time to plan a move to a newer version, even once you’re patched.
  • If your host changes your PHP version, test your site afterwards. Older themes and plugins don’t always work with newer PHP versions.

Check it from your control panel

If your hosting uses cPanel

  1. Log in to cPanel as you normally would.
  2. In the Software section, open MultiPHP Manager.
  3. Find your domain in the list. The PHP Version column shows the PHP version that domain uses.

Some hosts run a system called CloudLinux and offer a Select PHP Version screen in the Software section instead of, or as well as, MultiPHP Manager. If you have it, that screen shows the PHP version currently in use.

If your hosting uses Plesk

  1. Log in to Plesk.
  2. Go to Websites & Domains and find your domain.
  3. The PHP version in use is shown next to the PHP icon on the domain card.
  4. If you need more detail, click PHP. Plesk offers a View the phpinfo() page link there.

If your site runs on WordPress

  1. In your WordPress dashboard, go to Tools > Site Health.
  2. Open the Info tab.
  3. Expand the Server section and find the line labelled PHP version. It shows the full number followed by a note, for example 8.4.27 (Supports 64bit values).

Compare only the three-part number (here, 8.4.27). If you see a longer string, such as 8.3.x-1ubuntu…, it’s a build from your host’s operating system that may include the fix, so check with your host using the email at the end of this page.

If you only see part of the number

Some screens only show “PHP 8.3”, without the last number. That isn’t enough to tell whether you’re patched. Open your site’s phpinfo page if your host offers one (in Plesk, it’s the link above), use the check below, or ask your host for the full number.

Or run our free check

The downloads also live on the free PHP2Shell check page.

We’ve written a small check that reads your PHP version and gives one of three answers: Patched, Needs updating, or Can’t tell, ask your host. It only says “Needs updating” when the version is plainly below the fix. Anything a host or Linux distribution may have patched quietly gets “Can’t tell”, because the number alone can’t settle it.

Only run it on a server or website that’s yours. It sends nothing anywhere, changes nothing and doesn’t need administrator rights.

If you can log in to the server (SSH)

This is the better route. Download the script, copy it to the server and run it as your normal user:

Download php2shell-check.shshell script, 13 KB
sh php2shell-check.sh

It finds the PHP programs on the machine (command-line PHP, PHP-FPM, php-cgi, LiteSpeed and FrankenPHP, including the copies cPanel, CloudLinux, Plesk and Remi install), reports each one’s version and result, notes whether Apache’s mod_php is installed, and spots a PHP process that’s still running an old copy and needs restarting. It also shows the settings PHP’s advisory mentions. It’s plain, readable shell script, so you or a developer can read every line before running it.

For developers: no download? This one line does the basic version check for command-line PHP:

php -r '$f=["8.2"=>35,"8.3"=>36,"8.4"=>27,"8.5"=>12];$b=PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;$x=PHP_EXTRA_VERSION;if(isset($f[$b])&&PHP_RELEASE_VERSION>=$f[$b])$r="Patched";elseif($x!==""||PHP_VERSION_ID>=80200)$r="Can\x27t tell, ask your host";else$r="Needs updating (PHP $b gets no fixes from the PHP project)";if(isset($f[$b])&&$x===""&&PHP_RELEASE_VERSION<$f[$b])$r="Needs updating (unless your host or Linux distribution has added a backported fix)";echo "PHP ".PHP_VERSION.": $r\n";'

Your website can use a different PHP from the command line, so treat that line as a first look, not the final word.

If you can only upload files

It’s a single file that shows the PHP version your website actually runs, the result and three settings (four on PHP 8.5), then deletes itself.

  1. Rename it to something hard to guess, such as check-7f3k2q.php.
  2. Upload it to your website’s main folder (often public_html) with your file manager or FTP.
  3. Open it once in your browser, for example https://yoursite.example/check-7f3k2q.php, and note the result.
  4. Refresh the page. You should see “not found”. If the page said it could not delete itself, delete the file yourself straight away.

Before you upload anything: a file left on a website can be opened by anyone who finds it. This one deletes itself before it shows the result, shows nothing if it’s still there an hour after upload, and never shows phpinfo, folder paths or server names. Even so, don’t leave it there, and don’t upload it if your host’s terms don’t allow your own scripts. If you’re unsure, use the email below instead.

Check the download

To make sure your copy is the one we published, compare its SHA-256 fingerprint (on a Mac or Linux, shasum -a 256 <file>; on Windows, certutil -hashfile <file> SHA256):

  • php2shell-check.sh: 6541ecd12c92c1bc951ed95c2c63f2cda769cb7e70bb17b62791de3ab7d46cde
  • php2shell-check.php: 41fde2e76811217800ee48a889c908192be505dcfbccb60b10d7ddce176d4d8d

The same values are in SHA256SUMS.

What to do if you’re not patched

  1. On managed or shared hosting: contact your host and ask them to confirm the update (the ready-made email is below). You usually can’t update PHP yourself on this kind of hosting.
  2. If cPanel or Plesk lets you choose your PHP version: switching to a newer supported version may help, but only if the host has already updated that version on the server. Check the full number again afterwards, and test your site after any change.
  3. If you or a developer run your own server: update to one of the versions in the table, or install your Linux distribution’s updated PHP packages, then restart PHP (including all PHP-FPM workers, or Apache for mod_php) so the update takes effect. PHP’s advisory lists temporary measures for anyone who can’t update straight away, such as turning off session.upload_progress.enabled and lowering post_max_size, but PHP is clear these only reduce the risk. Updating is the only complete fix.
  4. If you use Cloudflare: Cloudflare says it has added protections to its free and paid web application firewall (WAF) rules. That helps, but doesn’t replace the PHP update.
  5. If you think your site may already have been attacked: the NCSC suggests getting help from an NCSC-assured Cyber Incident Response provider if you aren’t confident checking for yourself.

Email to send to your web host

Copy this, fill in the bits in square brackets, and send it to your host’s support team. You don’t need to share any passwords or logins to send it.

the email

Subject: PHP2Shell (CVE-2026-109618 and CVE-2026-109619): please confirm my site is patched

Hello,

On 21 October 2026 the PHP project released security updates for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619 (known as “PHP2Shell”). The fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.

Please could you confirm, for my account [account name or domain]:

  1. Which PHP version my site is running, including the full version number.
  2. Whether that version includes the fix for both vulnerabilities, either as one of the releases above or as a backported fix from your vendor.
  3. Whether PHP has been restarted since the update, so the fixed version is the one actually running.
  4. If my site uses PHP 8.1 or older, what you recommend I move to and when.

Thank you,
[Your name]
[Your business name]

Sources

Questions about this guide or the check? Email hello@burntandtoast.com.

Try the free PHP2Shell check

Get the next one by email.