Skip to page content

AEGLIX MIND

Connected intelligence.Security research, connected

AEGLIX news · Global

PHP Session Flaw Allows Code Execution via Interrupted Writes, Fixed in New Releases

Based on reporting from The Hacker News

Published by the source: Thu, 19 Nov 2026 22:29:56 +0530

AEGLIX News

A vulnerability in PHP's default file-based session handler can allow attackers to execute arbitrary code on servers by exploiting interrupted session writes combined with suitable gadget chains, according to security firm Depthfirst which discovered and reported the flaw to PHP maintainers. The issue, tracked as CVE-2026-126714 and rated 9.2 out of 10 on the CVSS 4.0 scale by PHP's maintainers, occurs when a session write is cut off at a precise moment, leaving attacker-chosen objects in the session file that can later be unserialized. Neither PHP's maintainers nor Depthfirst reports any attacks using the technique dubbed phpAfterShell.

The vulnerability affects PHP's files session handler, which is used by default, while sessions stored in Redis, databases, or other stores are not impacted. Affected versions include PHP 8.2 before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28, and PHP 8.5 before 8.5.13, with fixes released in those respective versions. PHP 8.6.0, released today, also includes the fix. PHP 8.1 and older are end-of-life; official end-of-life mitigation branches for 7.4, 8.0, and 8.1 are not affected, though older unpatched builds of those versions remain vulnerable according to Depthfirst.

The attack path leverages PHP's upload progress feature, which records file upload progress in the user's session and writes to the session before the application's own code executes. An attacker who can influence session data through upload progress and interrupt a write at a suitable point may inject objects that lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted as a result of the partial overwrite.

Remediation steps include installing the fixed PHP releases, moving PHP 8.1 or older to a supported branch, rebuilding container images and redeploying, and verifying that the PHP version serving web requests is the updated one. If an update is not possible and the application does not use upload progress, administrators can set session.upload_progress.enabled = 0 in php.ini or server PHP settings and restart PHP workers, though this is not a complete fix. The fixed releases empty the session file before each write and halt the write if that step fails, while also switching upload progress off by default.

Report prepared 2026-11-19 · Based on reporting from The Hacker News. Source publication date above; subsequent developments may not be reflected.

Sources

Read original source · The Hacker News (opens in a new tab)

Privacy policy

Explore the story

Consult the cited publisher for the original reporting, updates and supporting evidence. Check the publication date and source before acting on a headline.

These are research tools; no CVE, indicator, or campaign relationship is inferred from this article.

More from The Hacker News

← Back to security news