PHP2Shell: Critical PHP Vulnerabilities Require Immediate Patching
Two critical remote code execution vulnerabilities affecting PHP-based infrastructure have prompted emergency security updates. Organizations should assess their exposure and take immediate action.
On October 21, 2026, the PHP security team released emergency patches for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, collectively known as PHP2Shell. Both carry CVSS v4.0 scores of 9.2 and can allow unauthenticated remote code execution (RCE) on vulnerable systems.
The vulnerabilities affect PHP itself, rather than a particular website, plugin, or application. This distinction is important because PHP supports a substantial portion of the web infrastructure organizations rely on, including applications built on WordPress, Magento, Drupal, Joomla, and Laravel.
Public exploit information has circulated, and researchers have reported early exploitation attempts. With security updates now available, organizations should treat PHP2Shell as an emergency patching priority rather than waiting for their next scheduled maintenance window.
Understanding the PHP2Shell Vulnerabilities
PHP2Shell involves two vulnerabilities in how PHP handles memory and request-related data. Both can potentially allow an unauthenticated attacker to execute code with the privileges of the affected PHP web worker.
CVE-2026-109618 — CVSS 9.2
This vulnerability involves out-of-memory handling during request processing. Under certain conditions, memory allocation failures can leave internal request data in an inconsistent state. Subsequent cleanup operations may corrupt memory, creating a path to remote code execution.
CVE-2026-109619 — CVSS 9.2
This vulnerability involves stale global state that can persist after request-owned memory has been released. A later request processed by the same worker may interact with that invalid state, potentially enabling memory disclosure and remote code execution.
Affected PHP environments include PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed.
According to PHP's security advisory, Apache mod_php presents the highest risk, with demonstrated exploitation possible before application code begins executing. This means application-level authentication and security checks may not have an opportunity to stop the attack.
Why This Extends Beyond Individual Applications
One of the most important aspects of PHP2Shell is where the vulnerabilities exist. Organizations may maintain fully updated websites and applications while still operating vulnerable PHP runtimes underneath them.
Updating WordPress, Drupal, Joomla, Laravel, or another PHP-based application does not resolve vulnerabilities within PHP itself. The underlying runtime must receive the appropriate security update.
This also creates potential visibility challenges. PHP may be installed directly on web servers, bundled into container images, embedded in management interfaces, or included within third-party appliances and vendor products. These installations are not always captured by traditional application inventories.
Organizations using managed hosting should verify with their providers that the underlying PHP environment has been patched. Simply confirming that the website or content management system is up to date is not sufficient.
Emergency PHP Updates Are Available
The PHP security team has released updates for currently supported PHP branches. Organizations should update affected systems to at least the following versions:
| PHP Branch | Minimum Fixed Version |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
PHP 8.1 and older are no longer directly supported by the PHP project. Organizations using these releases should determine whether their operating system or long-term-support vendor provides an appropriate backported security fix or plan an upgrade to a supported release.
PHP has also published minimal source backports for versions 7.4, 8.0, and 8.1. However, organizations should generally rely on supported vendor or distribution packages rather than attempting custom source patches.
Applying the update is only part of the remediation process. PHP-FPM, Apache/mod_php, and other long-running PHP workers should be restarted afterward to ensure vulnerable processes are no longer active.
Recommended Actions for Organizations
Given the severity of these vulnerabilities and the availability of public exploit information, security and infrastructure teams should prioritize the following actions.
1. Identify all PHP installations
Inventory servers, websites, containers, applications, and services that depend on PHP. Prioritize internet-facing systems while accounting for internal services, management interfaces, appliances, and vendor products that may include embedded PHP runtimes.
2. Deploy the appropriate security updates
Apply the latest supported PHP security releases or vendor-provided backported fixes. Confirm that the relevant CVEs have been addressed, particularly when using distribution packages that may retain an older version number while incorporating security patches.
3. Restart affected services
Restart PHP-FPM, Apache/mod_php, and other PHP workers after patching. Validate that the updated runtime is active and that services are operating as expected.
4. Address unsupported installations
Identify PHP 8.1 and older installations and determine whether vendor-supported security fixes are available. Where fixes cannot be obtained promptly, prioritize upgrades, isolation, or replacement based on exposure and business criticality.
5. Confirm remediation with hosting and application providers
Contact managed hosting providers and relevant technology vendors to verify that underlying PHP installations have been updated. Do not assume an application update also includes a PHP runtime update.
6. Review systems for potential compromise
Investigate unusual shell activity, unexpected process execution, suspicious file uploads, memory-related application errors, repeated HTTP 500 responses, and unexplained PHP worker restarts. Review available logs and correlate suspicious events with other indicators of unauthorized activity.
7. Validate emergency patching and incident response procedures
Ensure that critical web infrastructure is covered by vulnerability management, security monitoring, and incident response processes. Confirm that teams can identify affected assets, coordinate emergency changes, and verify remediation without unnecessary delays.
What If Immediate Patching Is Not Possible?
Some organizations may face operational constraints, application compatibility requirements, or dependencies on third-party vendors that prevent immediate patching.
While these challenges may complicate remediation, PHP has stated that configuration changes and compensating controls do not provide complete protection against PHP2Shell.
Until the appropriate updates can be deployed, organizations should consider temporary risk-reduction measures, including:
- Restricting or isolating internet-facing PHP services where operationally feasible.
- Disabling session upload progress by setting
session.upload_progress.enabled=0and restarting affected PHP workers. - For PHP 8.5, setting
fatal_error_backtraces=0in accordance with PHP's advisory. - Reviewing
memory_limit,post_max_size, upload limits, and request-size settings against the official PHP guidance. PHP identifiesmemory_limit=-1as a temporary measure for CVE-2026-109618, but organizations should evaluate the operational implications before making this change. - Applying appropriate web application firewall and edge security protections to help reduce exposure.
These measures may interfere with known exploitation techniques, but they do not eliminate the underlying vulnerabilities. Disabling session upload progress alone is not a complete fix, and WAF protections should never be treated as equivalent to patching.
Organizations unable to patch immediately should document their exposure, establish an accelerated remediation timeline, and maintain heightened monitoring until the affected systems have been updated.
The Broader Security Implications of PHP2Shell
PHP2Shell illustrates how a vulnerability in a foundational technology can create widespread exposure across otherwise unrelated applications and services.
An organization may have strong application security practices, current plugins, and well-maintained web platforms while still carrying significant risk through an outdated or unpatched runtime. This makes infrastructure visibility just as important as application-level vulnerability management.
The incident also reinforces the importance of having an established process for emergency patch deployment. Threat actors can begin investigating and attempting to exploit newly disclosed vulnerabilities before organizations have completed their normal assessment and change-management cycles.
Maintaining accurate inventories, understanding technology dependencies, and establishing clear ownership for remediation can substantially improve an organization's ability to respond when critical vulnerabilities emerge.
How Critical Path Security Can Help
Critical Path Security recommends that organizations operating PHP-based infrastructure immediately evaluate their exposure and prioritize the appropriate security updates.
Our team can assist with vulnerability assessments, exposure validation, threat hunting, compromise assessments, incident response, patch prioritization, and security monitoring.
For organizations managing complex infrastructure or working through vendor dependencies, identifying which systems are affected and determining how quickly they can be remediated are essential first steps.
If your organization needs assistance assessing its PHP2Shell exposure or responding to suspected exploitation, contact Critical Path Security.
Final Thoughts
The PHP2Shell vulnerabilities are a reminder that maintaining secure applications requires more than updating the applications themselves. The underlying runtimes, supporting services, and infrastructure components must receive the same level of attention.
With emergency patches available and early exploitation attempts reported, organizations should move quickly to identify vulnerable PHP installations, apply the appropriate updates, restart affected services, and investigate suspicious activity.
Temporary controls may reduce exposure, but they are not substitutes for remediation. The priority should be to verify that affected PHP runtimes have been patched and that security teams have sufficient visibility to detect potential exploitation.


