News

PHP's November Security Releases Close a Session File Bug the October Patches Left Open

PHP 8.5.13 and matching November 19 releases fix CVE-2026-126714. Interrupted file-session writes can become RCE. October 21 PHP2Shell patches do not include this fix.

The PHP you patched in October is still open. A second session bug, published November 19, can turn a half-written session file into remote code execution.

The PHP project called 8.5.13 a security release on November 19, with matching builds on the other supported branches: 8.4.28, 8.3.37, and 8.2.36. The changelog lists CVE-2026-126714 as "Partially overwritten session files can lead to remote code execution." Depthfirst, which found the bug and named it phpAfterShell, rates it 9.2 on CVSS v4.0.

The hole is in PHP's default file-based session handler, session.save_handler = files. When PHP writes updated session data, the write is not atomic. If that write is interrupted, the file keeps part of the new data and part of the old. The next session_start() deserializes the mix. Depthfirst says an attacker who can influence session data, most easily through session upload progress, can make that mix parse as objects they chose. A gadget chain in the application turns those objects into code in the PHP worker.

October did not cover this

phpAfterShell is a different bug from PHP2Shell. The October 21 releases that Cyberpresso covered (8.5.12, 8.4.27, 8.3.36, 8.2.35) do not contain the fix. Depthfirst reported the new issue privately in late October. PHP published the patches on November 19.

Apps that store sessions in Redis, a database, or another non-file handler are outside this specific defect. WordPress, Laravel, or any other framework does not change the answer: the flaw is in PHP itself, on the default session store.

The same November 19 changelogs also close two other session bugs that can lead to code execution, CVE-2026-115560 and CVE-2026-129481. The story that got a name is the interrupted file write.

What actually patches

Upgrade. Depthfirst's table is 8.5.13, 8.4.28, 8.3.37, or 8.2.36, then rebuild images and confirm the version serving web requests. PHP 8.1 and older are end-of-life and will not get this fix; the official 7.4, 8.0, and 8.1 EOL mitigation branches disable the upload-progress callback and are not affected.

Until the new build is in production, set session.upload_progress.enabled = 0 in php.ini and restart PHP workers. That removes the easiest path. It is not the fix. The new build is still required.

Some offers on this page may be paid placements or contain affiliate links.

Cyberpresso: daily cyber & AI brief

Free daily newsletter, read in 5 minutes.

Subscribe free