Examine CVE-2026-109618 and CVE-2026-109619, check affected PHP versions and web SAPIs, review the disclosure timeline, and plan your response.
On 21 October 2026, the PHP project disclosed two critical PHP vulnerabilities, known together as PHP2Shell: CVE-2026-109618 and CVE-2026-109619. Both flaws allow unauthenticated remote code execution (RCE), which means an attacker can run arbitrary commands on your server over the network without logging in. Because this PHP RCE sits inside the PHP engine itself rather than a specific framework or plugin, even a single-line "Hello World" script is vulnerable if your PHP runtime is unpatched.
Next lesson: Find Every PHP Version and SAPI You Run
Both CVE-2026-109618 and CVE-2026-109619 carry a Common Vulnerability Scoring System (CVSS) v4.0 score of 9.2, rated Critical. Early rumors on social media before the official release mentioned a 10.0 score, but the official PHP security advisory rates both at 9.2.
Wiz states that PHP powers about 70% of websites. Because these flaws exist in the core C code that handles incoming HTTP requests, your application code cannot filter them out. Wiz demonstrated remote code execution against the latest official container images for WordPress, Drupal, and Joomla.
The PHP advisory titles CVE-2026-109618 "OOM Corruption", where OOM stands for out-of-memory. When a PHP process runs out of memory while internal request data is only partly set up, the engine triggers a cleanup step. Due to this flaw, the cleanup step treats that incomplete internal data as valid.
An attacker can trigger this remotely by sending large or specially crafted multipart requests, such as file uploads or form posts.
CVE-2026-109619 is a use-after-free vulnerability. In memory-unsafe languages like C, a use-after-free flaw happens when a program frees a block of memory but keeps a pointer to it, and a later operation uses that pointer as if the data were still valid.
In PHP, state left over from one failed request can point to memory that has already been freed. When a second request is handled by the exact same worker process, PHP can use that dangling pointer. According to the PHP advisory, this flaw involves fatal errors or request timeouts, the session upload progress feature, and on PHP 8.5, the fatal error backtrace feature. Along with remote code execution, PHP lists memory disclosure as a confirmed impact.
Think of a PHP worker process like a hotel room between guests. If housekeeping misses something the last guest left behind, the next guest in that same room finds it.
Common Mistake: Do not assume your application is safe because you do not use file upload forms or WordPress. PHP parses multipart request data and session upload progress before your application router or controller even sees the request.
Every web-accessible PHP installation on an unpatched version is exposed, regardless of the framework or application code running on top of it.
Researchers traced the earliest affected code all the way back to PHP 5.4.0. Your patch path depends on which PHP branch you run and whether you install PHP from upstream sources, container images, or Linux distribution packages.
| PHP Branch | Status | Official Fix Version | What You Should Do |
|---|---|---|---|
| PHP 8.5 | Active support | 8.5.12 | Upgrade to 8.5.13 or later, or apply your OS vendor patch |
| PHP 8.4 | Active support | 8.4.27 | Upgrade to 8.4.28 or later, or apply your OS vendor patch |
| PHP 8.3 | Security support | 8.3.36 | Upgrade to 8.3.37 or later, or apply your OS vendor patch |
| PHP 8.2 | Security support | 8.2.35 | Upgrade to 8.2.36 or later, or apply your OS vendor patch |
| PHP 7.4, 8.0, 8.1 | End-of-life upstream | No official release | Use Linux distro or LTS vendor patches, apply minimal source backports, or upgrade PHP |
| PHP 5.4 to 7.3 | End-of-life upstream | None | Isolate from the network and upgrade to a supported branch |
Linux distributions and long-term support (LTS) vendors received the patches in advance of public disclosure. If you run PHP from Ubuntu, Debian, or Red Hat Enterprise Linux (RHEL) repositories, your vendor package may carry the fix under an older version number like 8.1 or 8.2. You will verify those backported package versions in the next lesson.
If you build PHP 7.4, 8.0, or 8.1 from source, the PHP security team published minimal source backport patches, though they did not cut new official release tarballs for those branches.
Your remediation strategy depends entirely on whether your PHP branch is actively supported, covered by an OS vendor backport, or completely end-of-life.
A Server Application Programming Interface (SAPI) is the layer that connects the PHP engine to a web server or command prompt. According to the PHP advisory, every SAPI that serves web requests is at risk:
mod_phpphp-cgiCommand-line interface (CLI) scripts that do not serve web requests are not the main exposure. You should still update them at the same time because they share packages and libraries with your web runtime.
The PHP advisory states that Apache mod_php is the highest risk configuration. With mod_php, the PHP interpreter is embedded directly inside each Apache worker process, and a demonstrated exploit can run before any application code executes.
PHP-FPM is also vulnerable and must be patched immediately. For CVE-2026-109619, one confirmed exploitation path requires two requests to land on the same worker process so the second request can hit the corrupted state left by the first.
Pro Tip: If you have dozens of servers to patch today, prioritize internet-facing Apache mod_php hosts first, followed immediately by internet-facing PHP-FPM, FrankenPHP, LiteSpeed, and php-cgi servers.
While mod_php presents the easiest target for attackers, every web-facing PHP SAPI requires patching.
Understanding the timeline tells you how far back your security team needs to inspect server logs.
Multiple threat actors began exploiting PHP2Shell from 21 October 2026, and attacks have since been confirmed against real systems, including internet-facing security gateways that bundle their own PHP. Attackers used those gateways as a foothold into the networks behind them. Amazon described PHP2Shell as broadly exploited and recommended that organizations investigate their logs from 17 October 2026 onward. National cyber agencies, including CISA in the United States and the National Cyber Security Centre (NCSC) in the United Kingdom, told organizations to patch immediately.
Several public proof-of-concept (PoC) scripts have appeared online. Rapid7 analyzed these scripts and found that each works only for a specific combination of operating system, PHP version, and web server, and none is broadly reliable. Furthermore, the PHP Foundation's review found no functional exploits among the ones that leaked at release.
Common Mistake: Never download or run public exploit code from the internet to "test" whether your production servers are vulnerable. Unverified exploit scripts frequently fail to match your exact binary layout, can crash your worker processes, and often contain disguised malware or backdoors that compromise your workstation.
Treat any internet-facing PHP server that was unpatched on or after 17 October 2026 as potentially targeted, and verify your defenses through package versions and logs rather than live exploit scripts.
Throughout this course, you will apply each step to a realistic environment at a fictional company called Brightline Logistics. Brightline runs three PHP applications across different infrastructure stacks:
brightline-www: The public WordPress marketing site at www.brightline.example. It runs on Ubuntu 22.04 with Apache and mod_php, using Ubuntu's distribution packages for PHP 8.1.brightline-portal: The customer portal, a Laravel application on PHP 8.3 with PHP-FPM and nginx, running in Docker from the official php:8.3-fpm base image.brightline-invoicing: An old internal invoicing application running on PHP 7.4 on a Red Hat Enterprise Linux 8 virtual machine.Notice how each application has a different risk profile:
brightline-www is internet-facing and runs mod_php. It is the highest priority. Because it runs on Ubuntu 22.04 with PHP 8.1, you will check for Canonical's backported security update rather than an upstream PHP 8.1 release.brightline-portal is also internet-facing and runs PHP-FPM in Docker. You will need to pull the patched php:8.3.37-fpm image, rebuild, and redeploy the containers.brightline-invoicing runs end-of-life PHP 7.4 on an internal network. You will isolate it, check for vendor patches, and plan an upgrade to a supported branch like PHP 8.4.Here is the response order you will follow across the rest of this course:
A structured response plan ensures you fix your highest-risk internet-facing servers first without overlooking legacy internal systems.
Before running a single command on your servers, sort your own applications by risk just like you did for Brightline Logistics.
Quick Challenge: Open a scratchpad and list the top three PHP applications you are responsible for. For each one, write down:
mod_php, PHP-FPM, FrankenPHP, LiteSpeed, or php-cgi)?mod_php servers at the very top.If you do not know the exact version or SAPI for one of your servers, mark it as unknown. You will uncover that exact data in the next lesson.
In the next lesson, Find Every PHP Version and SAPI You Run, you will audit your servers and containers to uncover every running PHP version, web SAPI, and distro backport status.
Was this lesson helpful?