PHP 8.2 < 8.2.35, 8.3 < 8.3.36, 8.4 < 8.4.27, 8.5 < 8.5.12 - Use-After-Free Remote Code Execution
PHP 8.2 before 8.2.35, 8.3 before 8.3.36, 8.4 before 8.4.27, and 8.5 before 8.5.12 contain a use-after-free caused by request-owned global state that is not reset before the request heap is freed, letting unauthenticated attackers execute arbitrary code in a subsequent request handled by the same worker; exploitation requires a crafted request sequence and a reachable session or INI consumer. This template performs a passive version check against the PHP version disclosed in the X-Powered-By or Server response header and does not send a crafted request. It follows same-origin redirects (same host and port); redirects to another origin are ignored so a third-party response cannot be attributed to the scanned host. Limitations: detection requires the version to be exposed, so hosts with expose_php=Off and no PHP version in the Server header, hosts behind a proxy or FastCGI configuration that strips these headers, and applications that override them are not detected. These headers can also be spoofed, so a match is only as trustworthy as the disclosed header. Builds that backport the fix while keeping the upstream version number (for example 8.2.34-1ubuntu1) still match, so a match reports an affected upstream version rather than confirmed exploitability. Pre-release or development builds of a fixed version (for example 8.2.35RC1) and responses that advertise conflicting versions in different headers are not matched. References: https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp https://www.php.net/archive/2026.php#2026-10-21-5 https://www.openwall.com/lists/oss-security/2026/10/21/7 https://calif.io/php2shell/ https://www.wiz.io/blog/php2shell-php-rce https://nvd.nist.gov/vuln/detail/CVE-2026-109619 Remediation: Upgrade to PHP 8.2.35, 8.3.36, 8.4.27, or 8.5.12 and restart all PHP workers. Until patched, set session.upload_progress.enabled=0 and memory_limit=-1 as partial mitigations.
url