Guide · Ilia Dubovskii · 17 November 2026

PHP2Shell (CVE-2026-109618 and CVE-2026-109619): Affected Versions, Fixes, and Containment

PHP2Shell is the name for two remote code execution flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, both rated CVSS 4.0 9.2. They need no login and fire while PHP is setting up or tearing down a request, often before your application code runs. PHP shipped fixes on 21 October 2026; exploitation had already been seen four days earlier. Here's who is affected, what to install, and how a single honeytoken contained our own PHP2Shell incident in under two minutes.

The short version

1. What PHP2Shell is

Most PHP security bugs live in an application or a framework. PHP2Shell is in the interpreter, which is why it reaches every PHP site at once. It's two separate memory-safety bugs:

Both are reachable with one unauthenticated request, and both happen in PHP's request handling rather than in your code. PHP's maintainers rated the risk highest for Apache mod_php, where an attack can succeed before the application runs at all.

2. Am I affected?

If PHP serves web requests on your system, assume yes. The advisories name PHP-FPM, Apache mod_php, php-cgi, LiteSpeed and FrankenPHP. The CLI running a cron job isn't the target; anything parsing HTTP requests is.

PHP branch Status What to do
8.5, 8.4, 8.3, 8.2Affected before 8.5.12, 8.4.27, 8.3.36, 8.2.35Install the fixed release
8.1, 8.0, 7.4Affected; no official releaseDistribution or LTS vendor package, PHP's source backports, or upgrade
7.3 and older, PHP 5Affected; no fix (watchTowr confirmed PHP 5)Upgrade, or remove from the internet

PHP turns up in places that aren't obviously PHP sites: the official php: Docker images and every image built FROM them, apt install php8.3-fpm lines in Dockerfiles, Bref layers on Lambda, WordPress and Drupal images, and appliances. Palo Alto Networks reported that PAN-OS and Panorama were affected, and Unit 42 described attacks on exposed PAN-OS management interfaces.

3. What to install, and what doesn't work

4. Timeline

The gap that matters: attackers had the bug before defenders had a patch. Patch speed can't cover that window. Detection has to.

5. Our PHP2Shell incident: under two minutes

We run a few public PHP sites in containers on AWS Fargate. Ten months earlier, React2Shell had kept an attacker inside our network for four days while our alerts were explained away. This time the containers carried something extra: a decoy AWS access key and a decoy database login in the environment, next to the real variables. The app never uses them.

  1. The attacker got code execution through PHP2Shell, read the environment, and tried the AWS key.
  2. CloudTrail logged the call. An EventBridge rule matched the decoy and delivered it to the agent. The alert reached Slack in under a minute.
  3. Each decoy is planted in exactly one task definition, so the key ID named the compromised task. No guessing.
  4. The agent restarted that task. A clean container from the image replaced it. Restarting is easy to undo, so the agent could do it alone. One more minute.

Under two minutes from the attacker's first move to containment, with zero harm. The incident and the reasoning behind it are the subject of the talk One Fake Password Is Worth More Than 10,000 Alerts. The restart didn't fix the PHP bug; only the patched image does that. What the restart did was end that attacker's session before it could become four days.

6. How Compass helps

The agent in that story is Compass, which we open-sourced (Apache 2.0). It covers both halves of a PHP2Shell-style event.

Before: the patch pull request

During: active defense with honeytokens

What it doesn't do

It doesn't stop the exploit request, and it doesn't see an attacker who never touches a decoy. It's a tripwire on the attacker's most predictable move, the credential grab, plus a fast patch path. Keep GuardDuty and your alerts; the honeytoken decides, the alerts explain. More about Compass · build a honeytoken by hand.

7. FAQ

What is PHP2Shell?

PHP2Shell is the nickname for CVE-2026-109618 and CVE-2026-109619, two unauthenticated remote code execution vulnerabilities in the PHP interpreter, disclosed in October 2026 and rated CVSS 4.0 9.2. A single crafted request can run code on the server, in some setups before the application's own code runs.

Which PHP versions fix PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026. PHP 7.4, 8.0 and 8.1 received minimal source backports rather than official releases, so use your distribution's or LTS vendor's package. PHP 7.3 and older, including PHP 5, have no fix: upgrade or take them off the internet.

Does WordPress or Laravel need an update for PHP2Shell?

No, the bug is in PHP itself, so the fix is a new PHP build: the php-fpm package, the php Docker base image, or your hosting provider's PHP. A WordPress or Laravel update doesn't change the interpreter. Remember to rebuild images and restart PHP workers so the patched binary is what's running.

Can I mitigate PHP2Shell with a php.ini setting?

Not fully. PHP's maintainers say no configuration change fully mitigates these vulnerabilities. Some researchers list session.upload_progress.enabled, which is on by default, as a precondition for CVE-2026-109619, but turning it off doesn't address CVE-2026-109618. Patch, and restrict internet access to any PHP system you can't patch right away.

Is PHP2Shell being exploited?

Yes. Amazon reported an exploitation attempt against its honeypots on 17 October 2026, four days before the fixes shipped, and watchTowr observed exploitation on 21 October. CISA added CVE-2026-109618 to its Known Exploited Vulnerabilities catalogue on 26 October 2026. Palo Alto Networks also reported that PAN-OS management interfaces were affected and attacked.

Are PHP Lambda functions on Bref affected?

Bref layers bundle a PHP build, so a function on a layer built before the fix carries a vulnerable PHP. Move to a layer version built with a fixed PHP release. Exposure is lower than for a long-running web server, but a function behind an API Gateway or function URL still parses untrusted requests.

Written by Ilia Dubovskii, founder of Beamreach. Versions and dates were checked against PHP's advisories and reporting from watchTowr, Akamai, Help Net Security and Palo Alto Networks Unit 42 on 17 November 2026. Sources differ on some details, such as exact disclosure times; check php.net before relying on one. Our incident is anonymised and simplified.

Related: The *2Shell vulnerabilities, 2021 to 2026 · React2Shell (CVE-2025-55182) · AWS canary credentials · What to automate in incident response · One Fake Password Is Worth More Than 10,000 Alerts (talk)