PHP2Shell Attacks: Update the Runtime Behind Your Website

Brendan Smith
Brendan Smith - Cybersecurity Analyst
6 Min Read
An emerald clamp repairs the PHP foundation beneath a website.
PHP2Shell fixes belong in the PHP runtime serving the website.

PHP released emergency security updates on October 21 for two flaws that can let an unauthenticated attacker execute code on a web server. [1] Cloudflare says it has already observed attack traffic targeting the bugs, collectively called PHP2Shell, including changes to malicious requests aimed at evading its defenses. Its report does not establish whether those attempts led to successful compromises. [4]

Website owners should update the PHP runtime to 8.2.35, 8.3.36, 8.4.27 or 8.5.12, or install a vendor package that explicitly fixes both CVEs. Updating WordPress, a theme or a plugin does not replace that server-side repair. On managed hosting, ask the provider to confirm the patched package is actually running for your website.

A request can reach the flaw before the website runs

The vulnerabilities are tracked as CVE-2026-109618 and CVE-2026-109619. Both carry a critical CVSS v4.0 score of 9.2. PHP identifies Apache with mod_php as the highest-risk deployment: researchers demonstrated code execution through an unauthenticated HTTP request before the application itself started.

That timing matters. A login check or a carefully maintained CMS cannot protect code that has not started running yet. PHP first has to interpret incoming request data, and some of that work happens below the application’s security controls.

In CVE-2026-109618, an out-of-memory failure can interrupt PHP while internal request structures are only partly initialized. The subsequent cleanup can use those invalid structures. PHP’s advisory describes multipart request handling that can consume far more memory than the request’s apparent size suggests. Successful exploitation runs code with the web worker’s account permissions; it does not automatically grant root access. [2]

CVE-2026-109619 crosses the boundary between requests. A worker can retain internal pointers to memory belonging to a finished request. When that worker handles another request, an operation can touch the stale state before normal initialization replaces it. Session upload-progress handling is one confirmed route. It is enabled by default and does not require the application to call session_start(). [3]

PHP-FPM needs the update too

The strongest mod_php demonstration should not be read as a universal exploit for every PHP deployment. Build options, extensions, application behavior and request handling affect exploitability.

For the out-of-memory flaw, PHP says source analysis supports PHP-FPM susceptibility, while no complete FPM exploit for that specific flaw has been demonstrated. For the stale-state flaw, however, the advisory describes a validated FPM path: a suitable application operation leaves state behind after successful startup, a fatal error interrupts its cleanup, and a later request reaches it through upload-progress handling.

PHP therefore urges updates for all installations serving web requests, including FPM, mod_php, CGI, FrankenPHP and LiteSpeed. The different prerequisites explain the risk; they do not make switching handlers a complete remedy.

Which PHP packages contain the fixes?

Upstream branch Security release
PHP 8.2 8.2.35
PHP 8.3 8.3.36
PHP 8.4 8.4.27
PHP 8.5 8.5.12

Distribution packages can carry the fixes under older-looking version numbers. Ubuntu’s October 21 notice, for example, lists 8.3.6-0ubuntu0.24.04.13 for Ubuntu 24.04 LTS and 8.1.2-1ubuntu2.28 for 22.04 LTS. The full package revision and the vendor’s advisory matter when checking a backport. [5]

PHP 8.1 and older no longer receive supported releases from the PHP project. Some distributions and LTS vendors supply backports, and PHP’s security team has provided minimal source patches for 7.4, 8.0 and 8.1. Those patches do not restore normal support for obsolete branches. Obtain an explicit vendor fix or move to a compatible supported release.

Confirm the web worker was replaced

Inventory each PHP installation that serves traffic, including containers, hosting-panel runtimes and bundled web applications. Apply the relevant vendor update, then restart or replace the affected PHP workers so they load the corrected code. A host with several PHP versions can have one patched website and another still exposed.

The command-line result from php -v identifies that particular executable. It does not by itself prove which runtime an Apache module, FPM pool or container uses. Confirm the handler and package assigned to the website, then check that the application works after the update.

Cloudflare’s observed attempts make a web application firewall (WAF) useful additional protection, but PHP says only an update completely addresses the vulnerabilities. The project’s temporary settings cover particular paths and have operational consequences; disabling upload progress alone does not fix every variant.

Keep the runtime repair separate from incident recovery. If a site has unexpected files, accounts or outbound connections, patching does not establish that earlier access never happened. Preserve relevant logs and investigate those signs. The immediate decision is to get the running web stack onto a confirmed fixed package.

October 23 update: investigate from before disclosure

Amazon’s October 21 report dates a PHP2Shell attempt in its MadPot honeypot network to October 17, four days before public disclosure. It also records further attempts before the embargo lifted. Amazon says it remains unclear whether those attempts would have succeeded on real systems. [6]

For a potentially exposed site, preserve and review available logs from at least October 17, rather than beginning only on patch day. Correlate unusual requests with unexpected process execution and file changes. Amazon cautions that its listed source IPs include shared anonymization infrastructure; a matching address warrants investigation and does not by itself prove compromise.

October 27 update: both flaws are now in CISA’s exploited catalog

On October 26, CISA added both CVE-2026-109618 and CVE-2026-109619 to its Known Exploited Vulnerabilities catalog. Each entry gives an October 29 response date, marks forensic triage as required in the catalog’s response guidance and lists use in ransomware campaigns as Unknown. The addition is stronger evidence of real-world exploitation than a proof-of-concept release; it does not establish that every vulnerable website was compromised or that either flaw was used for ransomware. [7]

For a site owner, prioritize confirming the running web handler’s fixed PHP package and preserving incident evidence alongside the update. The catalog date is not a reason to wait until October 29 on an exposed server. Keep the earlier October 17 investigation window above: the date an issue enters KEV is not the first possible attack date. Replacing a vulnerable runtime closes that exposure, while unexpected processes, files or accounts still need separate investigation.

November 12 update: a gateway foothold reached an ESXi host

A new Check Point Research investigation traces an October 30 intrusion from a vulnerable Mobile Access portal to destructive activity deeper in the network. PHP2Shell supplied the initial entry; the attacker then used a separate local privilege-escalation flaw in DynamicCLI, CVE-2026-123039, to move from the portal service account to root. A broader scanning wave followed on November 2. The researchers found no evidence of destructive activity in that second wave. [8]

The revealing artifacts were PHP session files containing upload_progress_pwn, alongside hundreds of crashes in the portal’s Apache/PHP workers. After obtaining privileged execution, the attacker placed command-execution webshells in the portal’s template directory, then deployed TSGA, a persistent standalone backdoor. Its embedded TSProxy component was written as /lib/libcpfwcommon.so and loaded into appliance processes to handle specially marked connections while ordinary traffic continued.

Check Point diagram links PHP2Shell entry, gateway implants and the destructive ESXi stage.
The investigated chain moved from the gateway to an ESXi host. Source: Check Point Research, November 12, 2026, figure 1.

In the investigated destructive sequence, the attacker used the gateway to discover internal systems, connected over SSH to a VMware ESXi host with the vpxuser service account and executed the destroy_v6 wiper. The accompanying DREAM_ANNEXATION.txt note was politically themed and rejected ransom negotiations. The report does not establish that every scanned or compromised organization suffered this outcome.

Tooling overlaps link TSGA and TSProxy to the PhiliKit family, but Check Point does not attribute the operation with high confidence. Shared components, infrastructure and working hours do not settle whether one actor carried out the whole chain, access was handed off, or the destructive stage served another purpose. The note alone does not identify the operator.

For a previously exposed gateway, preserve and correlate portal crashes, session artifacts, template changes, appliance persistence and SSH activity toward internal hosts. Apply the vendor’s fixes for the affected appliance and the separate escalation flaw; an updated PHP runtime is not evidence that a deployed implant or a downstream foothold has disappeared. A different Linux investigation illustrates the same recovery boundary: GSocket can retain a separate access channel after the entry vulnerability is patched. These are separate investigations, not evidence of the same campaign.

References

  1. PHP Group. Security advisory: Critical remote code execution vulnerabilities. October 21, 2026; accessed October 21, 2026.
  2. PHP Security Team. RCE via OOM corruption — CVE-2026-109618. GitHub Security Advisories, October 21, 2026; accessed October 21, 2026.
  3. PHP Security Team. RCE via stale global state — CVE-2026-109619. GitHub Security Advisories, October 21, 2026; accessed October 21, 2026.
  4. Molteni, D., Jones, D., and Nandwani, K. Cloudflare deploys protections against php2shell vulnerability. Cloudflare, October 21, 2026; accessed October 21, 2026.
  5. Canonical. USN-8948-1: PHP vulnerabilities. Ubuntu Security Notices, October 21, 2026; accessed October 21, 2026.
  6. Moses, C. J. Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot. AWS Security Blog, October 21, 2026; accessed October 23, 2026.
  7. CISA. Known Exploited Vulnerabilities Catalog: CVE-2026-109618 and CVE-2026-109619. Entries added October 26, 2026; accessed October 27, 2026.
  8. Check Point Research. PHP2Shell Exploitation on Check Point Gateway. November 12, 2026; accessed November 12, 2026. Gateway persistence and the investigated ESXi destructive chain.
Share This Article
Cybersecurity Analyst
Follow:
Brendan Smith has spent over 15 years knee-deep in cybersecurity, chasing down malware from the gritty reverse-engineering of old-school trojans all the way to wrangling full-blown incident responses for small-to-medium businesses that couldn’t afford a full-blown breach. Over at Gridinsoft, he’s the guy piecing together those double-checked guides on nasty stuff like AsyncRAT, a remote access tool used in malware campaigns—helping readers make sense of the threat and work through cleanup without the extra headache.
Leave a Comment

AI Assistant

Hello! 👋 How can I help you today?