← All articles

PHP vulnerabilities fixed in updates across five release lines

PHP vulnerabilities fixed in updates across five release lines

PHP vulnerabilities affecting supported PHP deployments have been fixed in security updates covering seven critical flaws and one high-severity issue. The PHP Foundation said successful exploitation could lead to remote code execution, meaning an attacker runs their own commands on a server, as well as session corruption, denial-of-service, memory corruption or local privilege escalation.

The patches follow an advance warning from PHP maintainers about multiple critical vulnerabilities affecting all supported PHP versions under particular conditions. Some attacks require a non-default configuration, an uncommon setup or specific application behaviour, so the exposure depends on how PHP is deployed. The vulnerabilities are tracked with CVE identifiers, standard reference numbers for publicly reported security flaws, and most carry a CVSS score of 9.2 out of 10, indicating critical severity.

CVE-2026-115560 is an input validation flaw, where supplied data is not checked safely before processing. It can lead to remote code execution, file modification, session corruption or denial-of-service. It is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

CVE-2026-129182 and CVE-2026-129474 involve use-after-free bugs. This happens when software continues using memory after it has been released. The first can cause memory corruption and potentially full remote code execution, as in CVE-2026-109619, and is fixed in PHP 8.5.13 and 8.6.0. The second affects PHP 8.5 and later and can lead to remote code execution when an application allows enough request data to influence memory allocation, reaches a suitable magic method call and encounters a fatal error at the relevant time. It is fixed in PHP 8.5.13 and 8.6.0.

CVE-2026-126714, which Depthfirst has called phpAfterShell, is a time-of-check time-of-use, or TOCTOU, flaw. This means a program checks something and uses it later, leaving an opportunity for its state to change between those two actions. The flaw can allow arbitrary code to run with the privileges of the PHP worker. Exploitation requires control over session data, an interruption at a useful point during a write, and an application with a suitable deserialization gadget chain, a sequence of program behaviours that can turn stored data into code execution. The fix is included in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

Depthfirst said that if a pwrite or ftruncate update is interrupted, PHP may leave a malformed session file that is later loaded by session_start. PHP can then treat leftover data as serialized objects, which are stored program objects reconstructed from data. Combined with another PHP-native deserialization-to-remote-code-execution finding, this can provide a direct path to running code remotely.

The mechanism concerns file-based sessions and interrupted writes. A PHP worker may stop while a new session is being written, leaving part of the new data alongside bytes from the previous session. It may also stop after the new write finishes but before the older content is removed. In either case, two session states can become mixed. By choosing length fields in the new data, an attacker can make PHP interpret bytes that were previously part of an ordinary string as separate session entries and serialized objects. The attacker does not need deserialization to occur during the upload-progress callback. The required bytes only need to remain on disk until the application calls session_start, when PHP reads and deserializes the altered session. A valid prefix combined with the tail of another session can therefore be treated as a legitimate, different session and then chained with memory corruption in a PHP-native class to achieve remote code execution.

CVE-2026-129289 is an inconsistent interpretation of HTTP requests flaw. It can allow attacker-controlled PHP code to run as the worker without another user's interaction or a non-default PHP configuration. The attack requires a front end that keeps backend connections open and an application path that opens php://input without fully reading it. The source identifies nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, HAProxy FastCGI applications that retain backend connections and LSAPI as examples of relevant setups. The issue is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

CVE-2026-129481 is another use-after-free flaw. It can make session cleanup fail, potentially corrupt memory, crash a reused PHP worker or possibly enable remote code execution. It is fixed in PHP 8.3.37, 8.4.28, 8.5.13 and 8.6.0. CVE-2026-129496 can let an unauthenticated remote attacker crash PHP workers or execute arbitrary code with their privileges, and is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

The remaining issue, CVE-2026-129291, has a CVSS score of 8.8 and can enable local privilege escalation. Exploitation requires local code execution in a PHP-FPM worker, an affected pool with catch_workers_output enabled, the epoll event backend, and the ability to manipulate worker lifetimes while retaining inherited pipe descriptors. PHP-FPM is the PHP process manager commonly used to handle web requests. This flaw is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

The available patched releases are PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0. Users on existing 8.2.x, 8.3.x, 8.4.x or 8.5.x releases are advised to update to the latest version in their release line. The PHP Foundation's updates address the listed vulnerabilities, but the source does not establish whether any of them have been exploited in attacks.

If immediate patching is not possible, the specific mitigation advised for the file-based session issue is to turn off session upload progress. Website owners should also ask their hosting or IT team which PHP release is active and whether the deployment uses file-based sessions or the connection and configuration patterns described above. For WordPress site owners, AEU Hosting provides managed WordPress hosting, secured end to end.

Also available in: DeutschItalianoShqip