> ## Content Index
> Fetch the complete content index at: https://ettayeb.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# PHP fixes seven critical flaws, including a session bug that runs code remotely
- URL: https://ettayeb.fr/en/security/php-after-shell-session-rce-november-2026-en/
- Published: 2026-11-19T00:00:00.000Z
- Updated: 2026-11-23T15:24:38.000Z
- Description: On November 19, 2026, the PHP Foundation shipped eight fixes — seven critical and one high — including CVE-2026-126714, dubbed phpAfterShell, which turns a corrupted session file into remote code execution.
- Author: Walid Ettayeb
- Tags: Security, php, rce, session, deserialization, cve-2026-126714, #en, #cve, #Import 2026-11-23 14:52

**November 19, 2026.** The **PHP Foundation** releases security fixes for eight flaws — **seven critical** rated **9.2** and one **high** rated **8.8** — several of which lead to remote code execution. **November 19, 2026.** The firm **Depthfirst** details **CVE-2026-126714**, which it names **phpAfterShell**: an interrupted session write becomes a vector for arbitrary deserialization, then code execution. **November 19, 2026.** The fixed versions — **8.2.36**, **8.3.37**, **8.4.28**, **8.5.13**, and **8.6.0** — cover every supported branch. Why it matters: **PHP** still powers most of the web — **WordPress**, the majority of CMSes, countless custom applications — and its **session** mechanism is the backbone of authentication. A flaw that bypasses it hits the front door of millions of sites.

## Eight CVEs, seven critical, five branches fixed

The batch breaks down into eight identifiers, all **input-validation** or **use-after-free** problems in the language core, not in an extension. The fixed-version list shows the scale: **CVE-2026-115560**, **CVE-2026-126714**, **CVE-2026-129289**, **CVE-2026-129496**, and **CVE-2026-129291** are fixed in **8.2.36**, **8.3.37**, **8.4.28**, **8.5.13**, and **8.6.0**; **CVE-2026-129182** and **CVE-2026-129474** only affect the **8.5+** branches and are fixed in **8.5.13** and **8.6.0**; **CVE-2026-129481** is fixed starting at **8.3.37**.

The **PHP Foundation**’s advance notice had warned: several critical flaws affect "all supported PHP versions," including under non-default configuration or uncommon setups. The trap is that the bar is not that high for some of them. **CVE-2026-129496**, a *use-after-free*, lets an **unauthenticated** remote attacker crash **PHP** workers or run code with their privileges — with no exotic application requirement. **CVE-2026-129289**, an inconsistent interpretation of **HTTP** requests, executes attacker-controlled **PHP** code as the worker without another user’s interaction or a non-default configuration, as long as the front end keeps persistent backend connections and an application path opens `php://input` without reading it fully.

## phpAfterShell: an interrupted session turns into code

The most telling flaw is **CVE-2026-126714**, a **TOCTOU** (*time-of-check to time-of-use*) vulnerability in session-file writing. **Depthfirst** sums it up in one sentence: "If a `pwrite()`/`ftruncate()` update is interrupted, **PHP** may leave behind a malformed session file that is later loaded by `session_start()`, yielding an arbitrary deserialization primitive." Chained with another of its deserialization-to-RCE findings, it leads directly to code execution.

Concretely, the attack sequence turns an **interrupted write** into execution. The **PHP** worker dies while the session file is being written — or just after — leaving a partially written file on disk. On the next `session_start()`, that corrupted file is read and interpreted as a serialized object, in other words as an instruction to reconstruct objects. If the application ships a suitable deserialization *gadget chain*, an attacker who could influence the session data gains code execution with the worker’s privileges. Exploitation needs three conditions: influence over session data, an interruption at a useful point in the write, and an application with the right *gadget* — three conditions that, together, remain within reach of a targeted attacker, not a drive-by script.

The underlying mechanism deserves a closer look. **PHP** stores sessions as serialized files on disk, and the exact format depends on the `session.serialize_handler` directive — `php` by default, or `php_serialize` for applications that share sessions with other languages. That format is what lets a corrupted file be reinterpreted as an object to reconstruct on the next `session_start()`. The consequence for teams: the **phpAfterShell** vector does not disappear when you switch *handlers*, it just moves. And the risk is not limited to custom applications — it also covers the millions of **WordPress** and CMS installs on shared hosting, where the **PHP** runtime is patched by the host on a schedule you do not control.

To know whether you are exposed, three checks are enough. First, list the version actually running: `php -v` on every host and in every container image, because a server can be on **8.1** while your laptop is up to date. Second, look at where your sessions live: if they go through **Redis** or **Memcached** instead of the default directory, the **phpAfterShell** flaw loses its on-disk vector — without changing anything about the other seven. Finally, find the code paths that feed `$_SESSION` from user input: those are what an attacker will want to influence to turn deserialization into code execution.

## A version fix, not a setting

There is no clean workaround: the flaws are in the **PHP** core, and the only remediation is a **version upgrade**. Move to the fixed builds for your branch — **8.2.36**, **8.3.37**, **8.4.28**, **8.5.13**, or **8.6.0** — then restart **PHP-FPM** or **Apache**: a worker already loaded in memory keeps the old binary until it is relaunched.

Two field notes. First, **the version that matters is the interpreter running in production**, not the one on your laptop or the one declared in `composer.json`. A container, a **Docker** image, an app server behind a *load balancer*: every **PHP** executable must be updated, including the ones that "only" serve one microservice. Second, check the **session file path**. The **phpAfterShell** flaw exploits on-disk session storage; if your deployment uses a shared-memory session handler (**Redis**, **Memcached**) rather than the default `session.save_path`, that specific flaw’s attack surface shrinks — without changing anything about the other seven, which do not depend on it.

One hygiene point rounds out the picture: **CVE-2026-129291**, rated **8.8**, is a local privilege escalation. It requires prior code execution in an **FPM** worker, a pool with `catch_workers_output` enabled, the **epoll** backend, and the ability to manipulate worker lifetimes. It is a reminder that fixing an **RCE** does not excuse hardening pool configuration: once the worker is compromised, this flaw turns limited access into elevated privileges.

## The verdict

**If you run PHP in production, move to a fixed version today.** The batch is critical, the surface is the language itself, and **CVE-2026-129496** triggers without authentication or exotic configuration. The cost is an upgrade and a **PHP-FPM** restart; the risk is code execution on the engine that runs your applications.

**If you depend on a Linux distribution, watch its package schedule but do not wait on it.** **PHP** fixes land upstream first, then get rebuilt by distributions — during that gap, the flaws are public. Compare your package version against the fixed matrix, plan the cutover, and treat **phpAfterShell** as a signal: when a language’s session mechanism is attackable, the authentication of an entire generation of applications is at stake.

## References

- [The Hacker News — PHP Fixes 7 Critical Flaws, Including Bugs That Could Allow Remote Code Execution (November 19, 2026)](https://thehackernews.com/2026/11/php-fixes-7-critical-flaws-including.html?ref=ettayeb.fr)
- [The Hacker News — phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution (November 19, 2026)](https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html?ref=ettayeb.fr)
- [PHP — Changelog for versions 8.2 through 8.6 (November 19, 2026 fixes)](https://www.php.net/ChangeLog-8.php?ref=ettayeb.fr)