phpAfterShell and Critical PHP RCE Vulnerabilities: Everything You Need To Know

Detect and mitigate phpAfterShell, and additional critical vulnerabilities from PHP's November release that may enable remote code execution.

On November 19, 2026, the PHP group published security updates addressing 17 vulnerabilities across all actively supported branches (PHP 8.2, 8.3, 8.4, and 8.5). Seven of these flaws are rated Critical (CVSS 9.2) and present direct pathways to unauthenticated remote code execution (RCE). Security teams are advised to identify and patch exposed PHP deployments, as earlier mitigation efforts implemented during October's response to "PHP2Shell" do not provide protection against all of these new exploit vectors. As of yet, no exploitation in the wild has been observed by Wiz or mentioned in public reporting.

What are these vulnerabilities?

phpAfterShell: File-Based Session Handling (CVE-2026-126714)

Reported by depthfirst, this vulnerability exists in PHP’s default file-based session handler (session.save_handler = files). When PHP writes session update progress (such as during unauthenticated file uploads), the file-write process is not atomic. If a PHP worker process is abruptly stopped during this write, due to memory limits or timeout settings, it can leave behind a partially written, malformed session file.

When a subsequent request calls session_start(), PHP attempts to deserialize this file. If the file's contents are carefully structured, this deserialization process can be manipulated to trigger an object deserialization primitive. This behavior bypasses the initial parameters set during October's PHP2Shell patches, making a fresh update necessary to secure file-based session pipelines.

PHP-FPM Request Smuggling (CVE-2026-129289)

This issue centers on how PHP-FPM processes unread request-body bytes before reusing a persistent connection. In environments where the front-end web server (such as Nginx or Apache) is configured to keep FastCGI connections open to the FPM backend, an unauthenticated user can structure a request to append a secondary, hidden FastCGI request within the request body.

Because the backend does not discard the leftover bytes, the subsequent request handled over that same connection executes the smuggled instructions. This allows a request to bypass front-end routing rules and execute with the privileges of the active FPM worker.

Wiz Research data: what’s the risk to cloud environments?      

The overall risk depends largely on your environment's configuration. PHP remains widely used, powering approximately 70% of websites with known server-side languages. While the technical severity of these bugs is high, executing them successfully requires specific conditions. For instance, phpAfterShell (CVE-2026-126714) requires file-based sessions (the PHP default) and relies on finding an exploitable gadget chain in the application's code (which isn’t guaranteed to exist in every application) to achieve code execution.

Importantly, the vast majority of the other critical vulnerabilities in this release require non-default configurations or uncommon setups, such as enabling runtime-mixed session serializers, enabling PHP 8.5 exception arguments (zend.exception_ignore_args = 0), or writing startup warnings to a file-based error log on non-thread-safe builds. This ultimately means that default installations are naturally insulated from many of these vectors.

Which products are affected?

Affected VersionsPatched VersionsSupport Status
PHP 8.5 < 8.5.138.5.13Active Support
PHP 8.4 < 8.4.288.4.28Active Support
PHP 8.3 < 8.3.378.3.37Active Support
PHP 8.2 < 8.2.368.2.36Security-only support (Ends December 2026)
PHP 8.1 and earlierNo Official FixEnd-of-Life (EOL). These versions do not receive security backports.

Which actions should security teams take?

A. Plan a Routine Upgrade

  • Plan to update your PHP installations to 8.5.13, 8.4.28, 8.3.37, or 8.2.36 (or 8.6.0).

  • Rebuild affected container images and restart the PHP-FPM master service or web server process to ensure the newly patched binaries are active in memory.

B. Temporary Configuration Adjustments (If patching is delayed)

  1. Disable Session Upload Progress: If your application does not require tracking upload progress, disabling this feature in php.ini mitigates the primary attack path for phpAfterShell (CVE-2026-126714) in particular: session.upload_progress.enabled = 0

  2. Disable FastCGI Connection Reuse: Block the PHP-FPM request smuggling vector by configuring Nginx (fastcgi_keep_conn off) or Apache (enablereuse=off) to close backend connections immediately.

  3. Configure Exception Arguments (PHP 8.5): Ensure exception arguments are omitted to mitigate CVE-2026-129474: zend.exception_ignore_args = 1

Wiz customers can use the pre-built query and advisory in the Wiz Threat Center to search for vulnerable instances in their environment.

References

PHP’s November release CVEs:

CVESeverityDescription
CVE-2026-129289Critical 9.2PHP-FPM Request Smuggling: Allows unauthenticated attackers to execute PHP code when FastCGI connection reuse is active on the front-end proxy.
CVE-2026-126714Critical 9.2phpAfterShell: Non-atomic session file writes during upload progress can be interrupted, leaving malformed data that triggers RCE upon deserialization.
CVE-2026-115560Critical 9.2Session Serializer Mismatch: Mismatched read/write serializers on a shared session store with upload progress enabled can lead to object deserialization.
CVE-2026-129496Critical 9.2Timezone Cache Use-After-Free: Triggered by startup warnings written to a file-based error log on non-thread-safe builds, leading to potential worker crashes.
CVE-2026-129481Critical 9.2Interrupted Session Shutdown Use-After-Free: An incomplete fix for October's PHP2Shell vulnerability (CVE-2026-109619).
CVE-2026-129474Critical 9.2Magic Method Backtrace Use-After-Free: Affects PHP 8.5 deployments when exception arguments are explicitly enabled (zend.exception_ignore_args = 0).
CVE-2026-129182Critical 9.2Fatal Error Backtrace Use-After-Free: A secondary post-shutdown vector affecting PHP 8.5, building upon October's PHP2Shell flaws.
CVE-2026-129291High 8.8PHP-FPM Worker Escalation: Use-after-free issue allowing local users to escalate privileges from an FPM worker to the FPM master (often running as root).
CVE-2026-127960High 8.7HTTP Denial of Service: Specially folded HTTP response headers from a malicious remote server can cause excessive CPU utilization.
CVE-2026-128064High 8.2Cleartext Stream Wrapper Leak: Capitalized protocol schemes (e.g., HTTPS:// or FTPS://) cause stream wrappers to transmit data unencrypted.
CVE-2026-128090High 7.7Phar Signature Bypass: Attackers with write access to a signed Phar archive can downgrade the OpenSSL signature verification to a basic hash.
CVE-2026-129538Medium 6.9PHP-CGI Out-of-Bounds Read/Write: Occurs under inconsistent path mapping environments when using the legacy PHP-CGI binary.
CVE-2026-129501Medium 6.3DOM XML Double Free: Memory corruption triggered when executing saveXml() on specifically manipulated XML or HTML inputs.
CVE-2026-15353Medium 6.3SOAP Information Disclosure: Information leak affecting SOAP client or endpoint parsing.
CVE-2026-129506Medium 6.3SOAP Use-After-Free: Memory corruption vector targeting exposed SOAP endpoints processing DTD entities.
CVE-2026-129438Medium 6.3URI Serialization Bug: Incorrect RFC 3986 compliance serialization when processing exceptionally large, malformed URIs.
CVE-2026-129292Medium 5.3PHP-FPM Status Page XSS: Cross-site scripting vulnerability triggerable when an operator views the FPM full status page in a browser.

Continue reading

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management