What's in this article?
- Which part of the stack is affected?
- CVE-2026-109618: An allocation failure interrupts initialisation
- CVE-2026-109619: A reference survives into another request
- Which PHP versions contain the fixes?
- What if the application still requires PHP 7.4, 8.0 or 8.1?
- How to deploy and verify the update
- What can reduce exposure while a patch is pending?
- How to investigate possible exploitation
- Frequently asked questions
A login screen can only protect code that runs after it. PHP may already have parsed the incoming request and touched internal state by the time an application checks who the visitor is. That ordering matters for CVE-2026-109618 and CVE-2026-109619, the two PHP runtime vulnerabilities known as PHP2Shell. Under the right conditions, an unauthenticated remote attacker can execute code with the privileges of the PHP process. The PHP team rated both vulnerabilities 9.2 on the CVSS 4.0 scale and announced fixes on 21 October 2026. PHP security advisory.
Start by finding the PHP installation that actually handles web traffic. A version reported by the command line may belong to a different binary. The sections below explain the two failure mechanisms, how to read the version thresholds and how to confirm that the fix is active on a running service.
Which part of the stack is affected?
WordPress, Laravel and custom PHP applications depend on the PHP runtime to turn an HTTP request into application execution. PHP can parse inputs and prepare its own data structures before handing control to the application. It also has to dispose of those structures when a request ends early. The two vulnerabilities concern how the runtime handles those transitions.
The PHP advisory covers PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed when they serve web requests. It highlights Apache mod_php as the highest risk because an exploit was demonstrated before application code could run. An Nginx or Apache deployment that forwards requests to PHP-FPM still needs its package and configuration checked. A CMS login requirement or an application security plugin takes effect too late to protect a path the PHP runtime has already entered. PHP deployment and risk guidance.
CVE-2026-109618: An allocation failure interrupts initialisation
Consider an internal structure that PHP has allocated and made reachable while some of its fields are still being populated. If an allocation fails in that window, the original out-of-memory path can abruptly unwind request handling. The request cleanup code may then examine a partially initialised structure as if it were ready to use.
The failed allocation need not be for the structure that is left in an invalid state. The security issue arises from the timing and from what cleanup does with the invalid data. Where a request can drive the runtime into the vulnerable state, a memory safety failure can become remote code execution. A worker crash or an out-of-memory message on its own does not establish that anyone executed code.
The patch changes how PHP exits on memory exhaustion. It defers a soft out-of-memory stop to a safe point in the virtual machine. If consumption reaches a higher hard threshold, it ends the process without passing through the ordinary cleanup path that could encounter invalid state. The engine still retains the ability to limit memory usage. PHP advisory for CVE-2026-109618.
CVE-2026-109619: A reference survives into another request
A PHP worker may stay alive for many requests. The memory associated with any one request has a shorter lifetime. If a worker-level field refers to that memory, PHP has to clear the reference before it releases the memory. Otherwise, a later request can encounter a reference to a location that is no longer valid.
The PHP advisory distinguishes two parts of the attack path. A producer leaves request-owned state accessible to the worker. An interruption such as a fatal error or timeout can prevent the normal reset, and some diagnostics during cleanup can repopulate state after a reset. A consumer then acts on that reference in another request handled by the same worker, before normal initialisation replaces it. Accessing memory after it has been freed is known as a use-after-free.
The two pieces have to line up. The exact conditions depend on the PHP build, server integration, configuration and operations the attacker can reach. The advisory identifies session upload progress and early diagnostic handling as examples of code that can run during this window. This explains why an application can be exposed even when its login code behaves exactly as designed. PHP advisory for CVE-2026-109619.
Which PHP versions contain the fixes?
These are the first upstream releases that fix both CVEs. Choose the latest security release in a supported branch compatible with your application. If PHP comes from a Linux distribution or an appliance vendor, verify the full package revision against its bulletin. A supplier may ship the fixes without changing the upstream version shown by PHP.
| PHP branch | First fixed upstream release | End of PHP project security support |
|---|---|---|
| 8.5 | 8.5.12 | 31 December 2029 |
| 8.4 | 8.4.27 | 31 December 2028 |
| 8.3 | 8.3.36 | 31 December 2027 |
| 8.2 | 8.2.35 | 31 December 2026 |
PHP security release notice · PHP support schedule · Red Hat product and package bulletin.
What if the application still requires PHP 7.4, 8.0 or 8.1?
Regular support from the PHP project ended on 28 November 2022 for PHP 7.4, 26 November 2023 for PHP 8.0 and 31 December 2025 for PHP 8.1. The security team made a limited exception for this incident and published minimal source backports for all three branches. Distributions and long-term support vendors may also supply patched packages. An emergency backport does not restart regular security support for the branch. PHP end-of-life dates · PHP announcement on source backports.
Suppose a legacy booking system cannot run outside PHP 7.4 yet. Restrict access where possible and confirm whether the provider has a build that addresses both CVEs. In parallel, identify which dependencies block an upgrade and adapt them to a supported branch. A test should cover a complete booking, cancellation, notification and background job. A homepage loading successfully tells you little about those paths. PHP 7.4 to 8.0 migration notes.
How to deploy and verify the update
- Map the live runtime. Identify the PHP-FPM pool, Apache module, container or managed service behind each domain. Compare the web runtime with the shell version and account for sites pinned to different PHP builds.
- Select the right package. Match the full installed revision against the vendor advisory. For a container, rebuild from a patched base image and replace every running instance that used the old image.
- Test compatibility. Check dependency constraints, extensions, queues and scheduled jobs. Exercise sign-in, uploads, forms and transactions that matter to the site. Keep a recovery plan that does not return a vulnerable instance to public traffic.
- Refresh the running processes. After installation, reload or restart the services as required by the platform. Confirm that every instance behind the load balancer, including any reachable origin, is serving requests with the patched runtime.
- Record the result. Keep the package revision or image digest, deployment time and test result. Check that scaling or restarting the service will not pull an older image back into rotation.
On managed hosting, ask for the exact revision serving your domain and the bulletin that covers both CVEs. If the provider cannot support the target PHP branch, include a tested recovery step in the migration plan. Vericod’s WordPress hosting and migration guide.
What can reduce exposure while a patch is pending?
Restrict network access or isolate the vulnerable service where possible. For CVE-2026-109619, the PHP team advises disabling session upload progress if it is unused, applying the setting before request parsing and refreshing every worker. That reduces exposure through confirmed session paths. A setting changed inside the application arrives after the relevant early processing.
Request size and multipart limits can make some paths harder to reach. The PHP advisory’s temporary memory-limit guidance needs to be evaluated with process isolation and capacity controls. Removing memory limits indiscriminately on a shared host can create an availability problem. A WAF and traffic restrictions can buy time for deployment. Installing and activating a patched build is the comprehensive fix for these two CVEs. PHP temporary measures · Red Hat mitigation guidance.
How to investigate possible exploitation
CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October 2026. Prioritise unpatched internet-facing installations in your inventory. CISA KEV catalog.
AWS reported observing an exploitation attempt dating to 17 October 2026. A review that starts on patch day alone can miss earlier activity. Correlate proxy, web server, PHP, process and outbound network logs. Look for an unusual request followed by a worker crash, an unexpected process, an unfamiliar outbound connection or a file change. A large POST request or an isolated HTTP 500 is only a clue. AWS security bulletin.
If compromise is suspected, isolate the host and preserve logs and forensic evidence. Identify the database credentials, API keys and service accounts the PHP process could access. If the intrusion is confirmed, assess the scope, rebuild from a trusted image and rotate exposed secrets from a clean environment. Installing the patch closes the runtime entry point. Incident response is what addresses files, accounts or credentials an attacker may already have changed or taken. CISA incident response playbook.
Frequently asked questions
Does updating WordPress fix PHP2Shell?
WordPress core, themes and plugins have their own maintenance schedules. To close these two vulnerabilities, verify that the PHP runtime serving the website includes both fixes.
Is PHP 8.2.35 a good long-term target?
PHP 8.2.35 fixes the pair, but upstream security support for 8.2 ends on 31 December 2026. Use that date to plan a move to a compatible branch with a longer support window. PHP support schedule.
Does remote code execution give an attacker root?
Initial access follows the privileges of the PHP process. The attacker may be able to read configuration, alter writable files or use the application’s database account. Root access depends on broader permissions or an additional escalation path.