Security

PHP2Shell: the PHP fault that concerns your site, and what to do

Two critical flaws affect PHP and are already targeted by attacks. How to know if your site is exposed, and what to do.

Laurent LOUIS-THERESE · · 5 min de lecture

On 21 October 2026, the PHP project issued urgent fixes for two critical faults, known as PHP2Shell. PHP runs a very large part of the web, including WordPress, PrestaShop, Dolibarr and Laravel: if your site is based on one of them, it is concerned.

Updating your CMS is not enough. The fault is found in PHP itself, i.e. on the server, and its correction depends on you or your host.

Why this alert is different

Faults CVE-2026-109618 and CVE-2026-109619 allow an attacker to run code on the server, without an account and remotely. The PHP project assigns them a score of 9.2 out of 10 (CVSS v4.0), and specifies that all the installations that serve web queries are affected: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.

The risk is considered the highest with mod_php: a query can trigger the attack even before your site code runs. In other words, a well-maintained site is not protected.

Three elements raised the pressure:

  • A leak before the hour: information circulated online on 20 October, and the PHP project advanced the publication of the patches.
  • Attacks already noted: on CERT-EN reports attempts to exploit, and the US agency CISA added both flaws to its list of exploited vulnerabilities.
  • Unusual instructions: CERT-FR recommends that affected equipment be isolated, and CISA should put out systems that cannot be corrected.

What version of PHP should you have?

The corrected versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Below, on these same branches, your site is exposed.

For PHP 8.1 and older versions, the project no longer publishes updates. He provided only patches to compile himself for versions 7.4, 8.0 and 8.1.

Beware of the version number on these old branches. A host can integrate the patch without changing the number: 7.4.33 can therefore be vulnerable on one server and fixed on another. The number alone doesn't prove anything. Ask your hosting provider for a written confirmation.

How to check your site

On shared or managed accommodation, write to your host: "Is the fix for CVE-2026-109618 and CVE-2026-109619 applied to the PHP version of my site? " Also check the chosen version in your admin space, as a site can stay on an old version while the server offers a new version.

On your own server, check each installed version, not just the command line version:

php -v

Under Plesk, each version has its own path, for example /opt/plesk/php/8.3/bin/php -v. The compilation date (built:) helps to identify old installations. A server can coexist with a corrected version and an old version still used by a single forgotten site.

What to do according to your situation

Your version has a fix: Install it, then restart PHP. Then test your forms and your payment path.

Your site is blocked on an old version: This is the most risky case, and a security update will not be enough. The real output remains migration to a maintained version. Do it first on a copy of the site, as an extension, module or old code may not support it. Also think of the following: PHP 8.2 will cease to be maintained on December 31, 2026.

You can't migrate right now: Reduce exposure in the meantime. The PHP project proposes provisional settings, to be applied at the server level, and then followed by a restart:

session.upload_progress.enabled=0
memory_limit=-1
post_max_size=8M

Use post_max_size=32M if your site receives files. The PHP project is clear: these settings reduce the risk without making the installation safe. An application firewall can also help, but CISA presents it as temporary protection. If an old site no longer serves, the simplest thing is to cut it.

What if your site has already been targeted?

Fix PHP does not remove what an attacker would have already installed. In particular, search for:

  • recent PHP files that no one has deposited;
  • planned tasks or unknown accounts;
  • PHP processes that launch a shell or upload tools, the behavior that CISA recommends to monitor.

If you find something, keep the papers and do nothing in the rush. Also change the passwords and keys used by the site from a healthy post. Our page on the response to cyber security incidents details our intervention.

What to pay attention next

The PHP project announced a third flaw, CVE-2026-115560, whose fix will arrive with the next regular version. It only concerns a combination of unusual settings, but it recalls that a corrected version must be followed over time.

Your CMS asks for the same follow-up: WordPress comes for example from correct 22 faults in version 7.1.4.

To make the point, visit our page PHP development for a migration, our WordPress site maintenance, our Laravel business applications or our page cybersecurity.

Sources: PHP project announcement, CERT-FR alert and CISA alert.

To continue reading