phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution
Our summary
PHP maintainers have shipped fixes for a newly disclosed flaw dubbed phpAfterShell, tracked as CVE-2026-126714 and scored 9.2 on CVSS 4.0. The bug lets an attacker interrupt a default file-based session write at just the right moment so that PHP later deserializes attacker-chosen data, which combined with a gadget chain in the target application can lead to remote code execution; security firm Depthfirst discovered and reported it. The issue affects PHP releases before 8.2.36, 8.3.37, 8.4.28 and 8.5.13 — including servers patched on October 21 against the separate PHP2Shell flaws, which did not include this fix — while PHP 8.6.0 ships with the fix built in. No active exploitation has been reported, but admins are urged to update immediately, disable session.upload_progress if unused, or move sessions to atomic stores like Redis, since the file handler's upload-progress feature is the primary exploitation path demonstrated by researchers.
The Hacker News publishes this story on its own site; we link to it rather than reprint it.
Worried this affects your company?
Discuss a security assessment of your internet-facing systems. Scope agreed before testing.