← All news

Security alert · 31 Oct 2026

PHP2Shell: what to patch this week

Two critical PHP flaws allow remote code execution and are being exploited. Fixed versions, how to find your PHP estate and temporary hardening steps.

Last verified
4 Nov 2026
Updated
4 Nov 2026
CVE
CVE-2026-109618, CVE-2026-109619, CVE-2026-115560, CVE-2026-46300
Status
Fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. CISA lists both flaws as exploited. A Linux kernel flaw is chained with them to reach root.

Update 4 November 2026: CISA added both PHP flaws to its Known Exploited Vulnerabilities catalog on 26 October. On 28 October it added a Linux kernel flaw, CVE-2026-46300 (Fragnesia), and says it can be chained with the two PHP flaws to implant PHP webshells and run commands as root. Patching PHP is not enough. See “Patch the kernel too” below.

What happened

On 21 October 2026 the PHP team shipped emergency security updates for two flaws in the PHP core interpreter. Both are rated critical (CVSS v4.0 score 9.2) and can let an unauthenticated attacker run code on the server.

  • CVE-2026-109618 is an out-of-memory handling flaw. It can leave request data partly initialised.
  • CVE-2026-109619 is a stale state flaw. A later request on the same worker can use request state that was already freed.

Attackers did not wait. Amazon’s honeypots logged an exploit attempt on 17 October, four days before disclosure. Cloudflare reported attempts rising into the millions by 22 October. Some campaigns try to install a Mirai botnet variant.

Who is affected

Any PHP that serves web requests: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Google lists PHP 5.4 through 8.5.11 as affected. Google Cloud itself is not vulnerable, but the PHP workloads you run on it can be.

Branch Fixed in
8.5 8.5.12
8.4 8.4.27
8.3 8.3.36
8.2 8.2.35
8.1 and older No fix. Upgrade to 8.2 or newer.

What to do this week

1. Find every PHP you run. Not only servers. Look at container images, base images, CI runners, WordPress and Drupal hosts and managed platforms.

# On a host
php -v

# Inside an image
docker run --rm your-image:tag php -v

# Kubernetes: which pods run a PHP image
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"/"}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{" "}{end}{"\n"}{end}' | grep -i php

2. Update and restart. Installing the new package is not enough. Restart PHP-FPM, Apache or FrankenPHP so the patched binary is actually loaded.

3. On Google Cloud, follow the service you use.

Service What you need to do
App Engine standard PHP 8.2+ runtimes are patched automatically. On PHP 8.1 or older, upgrade and redeploy.
App Engine flexible Not patched automatically. Redeploy on a supported runtime.
Cloud Run and Cloud Run functions Patched automatically only with automatic base image updates. Otherwise rebuild and redeploy.
GKE Update the container image to a fixed PHP version and redeploy the pods.
VMs and self-built containers Update PHP, then restart the web process.

4. If you cannot patch today, reduce the risk first. These settings come from PHP’s advisory and Google’s guidance. They do not replace the patch.

session.upload_progress.enabled = 0
post_max_size = 8M
upload_max_filesize = 4M
max_input_vars = 250
max_file_uploads = 10
expose_php = Off
display_errors = Off

At the edge, block multipart/form-data on routes that never take uploads, limit request body size and turn on the Cloud Armor File Upload and RFI managed rules in enforce mode. In Cloud Armor, also add a body size limit so large payloads are not left uninspected.

5. Contain and watch. Run PHP workers as an unprivileged user with a read-only document root and memory limits set by cgroups. Block outbound internet access from PHP servers. Search your logs for unusual multipart POST requests since 17 October. If a host looks compromised, capture memory before you restart it.

Patch the kernel too

CVE-2026-46300, nicknamed Fragnesia, is a flaw in the Linux kernel’s IPsec ESP-in-TCP code. Red Hat describes it as a way for a low privileged local user to write bytes into the page cache of read-only files and gain root. Red Hat rates it Important, CVSS 7.8, because it needs local access. A PHP flaw gives an attacker exactly that: code running as the web user. CISA lists the kernel flaw as exploited and names the chain with CVE-2026-109618 and CVE-2026-109619.

The kernel fix is not new. Debian lists it as fixed in 6.1.174-1 for bookworm and 6.12.90-1 for trixie. Google’s GKE bulletin GCP-2026-033 covered it in May: GKE Standard clusters with Ubuntu nodes were affected, and GKE Standard with Container-Optimized OS and GKE Autopilot were not. What is new is that attackers now use it.

  1. Check the kernel. Run uname -r on every host that runs PHP, including container hosts and Kubernetes nodes, and compare it with your vendor’s advisory for CVE-2026-46300. Fragnesia is a different bug from the earlier Dirty Frag issue, so look for a kernel that names this CVE.
  2. Update and reboot. A new kernel package does nothing until the host boots into it. For Red Hat based systems and OpenShift, follow bulletin RHSB-2026-003.
  3. If you cannot reboot today, Red Hat’s interim step is to block the IPsec modules. This breaks IPsec, so check first that you do not use it.
lsmod | grep -E 'esp4|esp6'
printf 'install esp4 /bin/false\ninstall esp6 /bin/false\n' | sudo tee /etc/modprobe.d/dirtyfrag.conf
sudo rmmod esp4 esp6 2>/dev/null

If IPsec must keep working, Red Hat’s other option is to disable unprivileged user namespaces with user.max_user_namespaces=0. That can break rootless containers and sandboxed browsers. Remove both settings once the kernel is updated.

A third, separate issue

On 23 October PHP published an advisory for CVE-2026-115560. The 21 October releases do not fix it. PHP considers it unlikely to matter, and no exploitation has been reported.

It only affects applications that set session.serialize_handler to php_binary or php_serialize, switch it to php with ini_set() before session_start(), and keep session upload progress enabled. PHP will fix it in a routine release. Setting session.upload_progress.enabled=0 covers it, so if you applied step 4 you are done.

How we can help

If you are not sure how many PHP versions you run, or where, that is the first thing to fix. We can inventory your PHP across AWS, Azure and Google Cloud, patch it and put the temporary controls in place. Book a call from the button below.

Sources

  1. Google Cloud: Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619
  2. CISA alert: Critical vulnerabilities in PHP require immediate patching (21 Oct 2026)
  3. The Hacker News: PHP warns of another unpatched RCE risk
  4. The Hacker News: PHP issues emergency patches for two critical PHP2Shell flaws
  5. PHP 8.4.27 release announcement
  6. CISA Known Exploited Vulnerabilities catalog
  7. Red Hat bulletin RHSB-2026-003: Dirty Frag and Fragnesia (CVE-2026-46300)
  8. Debian security tracker: CVE-2026-46300
  9. Google Cloud: GKE security bulletins

Tell us what's slowing you down.

A 30-minute call with a senior engineer. You leave with a clear next step, whether or not that step is us.

Book a call