Skip to content
Bamboo Flags
Custom automation & AI for growing businessesDiscover · Design · Deliver · Drive

PHP2Shell PHP vulnerability: what to check on your website

On 21 October 2026 PHP fixed two critical flaws that let attackers run code on web servers. This article lists the facts, who must patch, and the checks to do.

Bamboo Flags4 min read

On 21 October 2026, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. These versions fix two critical flaws, CVE-2026-109618 and CVE-2026-109619, known together as PHP2Shell. An attacker can use them to run code on a web server without a password.

PHP is the language under WordPress, Drupal and Joomla. If your website or online shop runs on one of them, this affects you. The fix is on the server, not in the website, so your host, your IT provider or you must install it.

What the flaws do and which servers are affected

Both flaws are memory errors in how PHP handles a web request. One happens when a request reaches the memory limit. The other leaves PHP pointing to memory from an earlier request. The PHP advisory says: "There are no complete mitigations, updating is the only safe choice."

The US cyber security agency CISA published an alert on 21 October and revised it on 23 October. According to CISA, all PHP installations that serve web requests are affected. This includes Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. CISA tells organisations to patch immediately, internet-facing systems first.

TechCrunch reports that about 70% of the web-facing internet uses PHP, based on W3Techs data. Banks, retailers, online stores, hospitals and some government agencies took servers offline to patch.

Attacks started before the fix

Amazon found an exploitation attempt dated 17 October in its honeypot sensors, four days before the release. More attempts came between 02:00 and 08:00 UTC on 21 October, from several sources. Amazon says it is not clear whether these attempts would have worked on real systems. It tells defenders to start any investigation from 17 October, not from the release date.

The planned disclosure also broke down. The PHP Foundation's timeline says the two CVE numbers leaked on 20 October. On the same evening, Calif, the security firm that found the exploit, published a video of its proof of concept by mistake. On 21 October Chainguard published software images with the fix more than six hours before the agreed time. PHP moved the release forward by one day, to 21 October at 14:00 UTC.

What is not known

  • CISA said on 21 October that it had not seen successful exploitation. TechCrunch reports that working exploits existed by 23 October, according to Trail of Bits. No source gives a number of hacked websites.
  • PHP 8.1 and older get no fix from the PHP project. For these versions, CISA tells organisations to take PHP systems offline until they are patched or upgraded. Some Linux distributions publish their own fixes for old versions.
  • On 23 October PHP published a third, related flaw, CVE-2026-115560, in the session upload progress function. It affects the new versions too. PHP calls it an "unlikely RCE vector" and will fix it in the next regular release.

A firewall helps, but it does not replace the update

Cloudflare says that from 21 October at 03:02 UTC its web application firewall (WAF) blocks PHP2Shell requests by default, on free and paid plans. Cloudflare also says that "updating website code or a plugin(s) alone does not fix these vulnerabilities." A WordPress or plugin update does not change the PHP version on the server. If your site is behind Cloudflare, this protection gives you time, but you still need the update. We wrote about Cloudflare's default bot settings in an earlier article.

Checks for your website

  1. Find out who manages PHP on each of your websites. On shared or managed hosting, this is the host. On your own server, this is you or your IT provider.
  2. Ask that person or host in writing if PHP is updated to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to a patched distribution package. Ask for the date of the update. Also ask if session.upload_progress.enabled is set to 0, as PHP suggests for the third flaw.
  3. Do not trust the version number alone. InfoQ notes that the fixed Ubuntu 24.04 package still shows PHP 8.3.6. Ask for the package version.
  4. Make sure that PHP-FPM or Apache was restarted after the update. Running workers keep the old code in memory until they restart.
  5. If a site runs PHP 8.1 or older, plan the upgrade now. Test it on a copy of the site first. PHP 8.2 also stops getting security fixes on 31 December 2026.
  6. Ask your host to check the server logs from 17 October onwards. CISA tells defenders to look for PHP processes that start shells or download tools.
  7. If you use Cloudflare on a paid plan, confirm that the managed rules for PHP2Shell are in block mode.
  8. List other devices that run PHP, for example routers, storage devices and firewalls. Check each vendor's site for an update.

Found something worth fixing?

Bring it to a free 45-minute call.

Book a free 45-minute call

More from the blog