
Two critical vulnerabilities in the PHP runtime, collectively known as PHP2Shell, can potentially allow unauthenticated attackers to execute arbitrary code on vulnerable servers. Tracked as CVE-2026-109618 and CVE-2026-109619, both vulnerabilities carry a CVSS v4.0 score of 9.2, Critical.
On October 21, 2026, the PHP development team released emergency security updates addressing both vulnerabilities.
Because PHP powers millions of websites and applications, including WordPress, Drupal, Magento, and countless custom applications, these vulnerabilities represent a significant risk for web hosting providers. Organizations operating shared or dedicated PHP infrastructure also face exposure.
Xcitium WAF has prepared ModSecurity-based signatures to help mitigate known PHP2Shell exploitation techniques. Our protection rules are available through two deployment options.
- Xcitium WAF managed edge protection. Hosting providers can filter malicious HTTP requests before they reach vulnerable origin servers.
- Existing ModSecurity deployments. Our team is also ready to share its PHP2Shell-specific ModSecurity rule set with hosting providers and security teams that prefer to update their existing WAF infrastructure.
The objective is to help the hosting community reduce exposure immediately while administrators complete the necessary PHP security updates.
How PHP2Shell Affects the PHP Runtime
Unlike vulnerabilities targeting a particular PHP application or plugin, PHP2Shell affects the PHP runtime itself. Both vulnerabilities involve improper memory handling during HTTP request processing and error recovery.
| Vulnerability | Technical Cause | Severity |
|---|---|---|
CVE-2026-109618 |
Out-of-memory handling can leave partially initialized request memory in an invalid state | Critical, 9.2 |
CVE-2026-109619 |
Stale global state may reference memory already released by a previous request | Critical, 9.2 |
CVE-2026-109618 and Out-of-Memory Corruption
PHP uses the longjmp() mechanism to recover from certain memory allocation failures. Under specific conditions, an out-of-memory event can interrupt PHP while internal request structures are only partially initialized.
During subsequent cleanup, PHP may access this invalid state, potentially allowing an attacker to achieve memory corruption and remote code execution.
Potential attack-triggering conditions include the following.
- Specially constructed
multipart/form-datarequests. - Request bodies that bypass expected size checks because of missing or unusable
Content-Lengthinformation. - Excessive multipart headers or unusually complex form structures.
- Deeply nested form fields and repeated file-upload controls.
- Memory exhaustion triggered during request initialization or application processing.
Apache deployments using mod_php are considered particularly exposed because the demonstrated exploitation path can trigger during PHP request initialization, before application code executes. Other PHP server interfaces, including PHP-FPM, may also be susceptible under different conditions.
CVE-2026-109619 and Stale Global State
The second vulnerability concerns PHP’s handling of internal global state across requests.
When a PHP worker encounters certain fatal errors, internal structures may retain references to memory that has already been released. A subsequent request processed by the same worker may access those stale references before normal initialization, resulting in a use-after-free condition.
Confirmed attack-related paths include the following.
- Session upload-progress handling.
- Fatal errors and interrupted request processing.
- Certain PHP configuration diagnostics.
- Error and extension state that persists unexpectedly between requests.
Depending on the PHP configuration and application behavior, successful exploitation can result in remote code execution or information disclosure.
Updating WordPress plugins, themes, or application code alone does not remediate these vulnerabilities. The underlying PHP runtime must be patched.
Xcitium WAF Virtual Patching Is Available
Virtual patching provides an additional security layer by intercepting and blocking recognized malicious traffic before it reaches a vulnerable application or server.
Our PHP2Shell mitigation signatures are ready and use ModSecurity-compatible WAF rules. This allows hosting providers to introduce an additional line of defense without waiting for every hosted website or customer environment to complete its PHP upgrade.
How WAF-Based Mitigation Works
The relevant protection strategy focuses on HTTP request inspection and identifying patterns associated with the disclosed attack mechanisms.
- Multipart request inspection. Identifying malformed or suspicious upload structures and abnormal request formatting.
- Request size enforcement. Applying limits to request bodies and decoded input to reduce memory-exhaustion attack paths.
- Input complexity controls. Restricting excessive form parameters, multipart headers, nested input fields, and other resource-intensive structures.
- Upload-progress attack mitigation. Restricting suspicious session upload-progress behavior associated with confirmed exploitation paths.
- Malicious request blocking. Rejecting matching requests before forwarding them to the protected PHP origin.
These controls can reduce the exposure of vulnerable servers to known exploitation techniques. However, memory-corruption vulnerabilities can have multiple attack paths. No request-based WAF signature should be treated as equivalent to patching the PHP runtime.
Deploy Protection Through Xcitium WAF
Hosting providers using Xcitium WAF can activate the available PHP2Shell mitigation rules as part of their managed WAF protection.
Positioned in front of the origin infrastructure, Xcitium WAF can inspect HTTP traffic at the edge before it reaches the hosting environment. This is particularly valuable for providers operating thousands of customer websites across different PHP versions and hosting configurations.
A centrally managed WAF layer can help reduce attack exposure across multiple hosted websites while PHP upgrades are scheduled, tested, and rolled out. Origin servers should also be configured to prevent direct access that bypasses the WAF.
Use ModSecurity Rules on Existing Infrastructure
We also want to help hosting providers that are not currently using Xcitium WAF. Our team is ready to share the PHP2Shell-specific ModSecurity signatures with hosting companies and security administrators who wish to deploy the protections within their existing infrastructure.
Organizations operating compatible ModSecurity installations can request the rule set and integrate it into their existing WAF configuration.
For self-managed deployments, administrators should complete the following steps.
- Confirm ModSecurity is installed and processing traffic for the affected applications.
- Enable request-body inspection using
SecRequestBodyAccess On. - Add Xcitium’s PHP2Shell mitigation rules to the applicable WAF configuration.
- Validate rule syntax, request parsing, and legitimate application traffic.
- Enable enforcement using
SecRuleEngine Onand verify the required blocking actions. - Review WAF events and update the PHP runtime as soon as possible.
Request-size controls should reject over-limit requests rather than passing uninspected content to vulnerable PHP processes. ModSecurity’s SecRequestBodyLimitAction Reject can assist with this when correctly configured and enforced.
Exact limits and rule exclusions must be adjusted to the hosting environment to avoid disrupting legitimate uploads and application workflows.
To request the signatures, contact Xcitium with the subject “PHP2Shell ModSecurity Rules.”
Official PHP Security Updates
On October 21, 2026, the PHP development team released patched versions addressing both vulnerabilities.
| PHP Branch | Vulnerable Versions in Branch | Fixed Version |
|---|---|---|
| PHP 8.5 | Before 8.5.12 | 8.5.12 |
| PHP 8.4 | Before 8.4.27 | 8.4.27 |
| PHP 8.3 | Before 8.3.36 | 8.3.36 |
| PHP 8.2 | Before 8.2.35 | 8.2.35 |
| PHP 8.1 and older | Unsupported upstream branches | Upgrade or obtain a verified security backport |
The PHP project has also provided minimal source backports for PHP 7.4, 8.0, and 8.1. Organizations running unsupported versions should consult their Linux distribution or long-term support vendor for appropriate packages.
Additional Temporary Mitigations
Until updates are deployed, PHP administrators should consider the following measures in addition to WAF-based protection.
Reduce Unnecessary Upload Exposure
Disable multipart upload handling on applications or endpoints that do not require it. Enforce conservative request-body and upload-size limits.
The PHP security advisory suggests post_max_size = 8M for applications without file uploads and post_max_size = 32M where uploads are necessary, subject to application requirements.
Disable Session Upload Progress Where Possible
Set session.upload_progress.enabled=0 before request parsing, through the appropriate PHP or server configuration, and restart the relevant PHP workers.
This reduces exposure to confirmed CVE-2026-109619 session-related attack paths but does not address every possible exploitation method.
Review PHP Memory-Limit Configuration
For CVE-2026-109618, the PHP project recommends considering an administratively enforced memory_limit=-1 as a temporary mitigation against predictable PHP memory-limit failures.
This should only be evaluated alongside appropriate process or container memory isolation because it does not prevent underlying allocation failures or resource exhaustion.
Restart PHP Workers After Updating
Ensure that all PHP-FPM processes, Apache workers, or other PHP runtime processes are restarted after applying the patched packages. Merely installing updated binaries may leave vulnerable processes running.
Review Suspicious Activity
Look for unexpected web-server process crashes, abnormal upload requests, repeated server errors, suspicious child-process execution, and unexpected outbound connections from web-server accounts.
These are general investigation indicators, not definitive evidence of PHP2Shell exploitation.
Why Virtual Patching Matters for Hosting Providers
For hosting companies supporting thousands or millions of websites, upgrading the PHP runtime is rarely a single-step process.
Customers may depend on different PHP versions, applications may require compatibility testing, and production upgrades often require carefully coordinated maintenance windows. This creates an exposure window between vulnerability disclosure and complete remediation.
Our approach is to help close part of that window by providing a readily deployable WAF mitigation layer.
With Xcitium WAF, providers can introduce centrally managed protection. For providers operating their own ModSecurity infrastructure, we are ready to share our mitigation signatures so they can strengthen existing defenses without migrating platforms.
Apply the official PHP patches immediately. Until the upgrades are complete, Xcitium WAF can help reduce exposure to known PHP2Shell attacks.
Support for the Hosting Community
At Xcitium, we believe that critical security events require rapid, practical responses and industry collaboration.
Our PHP2Shell-specific ModSecurity rule set is ready, and our team is available to assist hosting providers seeking immediate WAF-based mitigation.
Whether the deployment uses Xcitium WAF or an existing ModSecurity installation, we are happy to help. Contact Xcitium to request PHP2Shell virtual-patching protection.
Conclusion
PHP2Shell leaves hosting providers with an exposure window while they upgrade different customer environments. Virtual patching can reduce that exposure, but it does not remove the underlying runtime flaws. Filtering malicious requests and fixing vulnerable PHP processes remain separate tasks.
Remediation requires the corrected PHP version to be running, with affected workers restarted after the update. Until that work is complete, WAF rules and request controls provide an additional layer within their known limits. Providers should also verify that direct origin access cannot bypass those protections. The final check is whether every affected environment has completed the upgrade, including customer workloads on different PHP branches.