Skip to content

Independent cybersecurity briefing

Latest

RSS
Breaches, bounties, zero-days, and AI.

Zero-Days & CVEs

PHP CVE-2026-126714: phpAfterShell scores 9.2

PHP file sessions can run code as the worker via CVE-2026-126714, phpAfterShell, scored 9.2. Install 8.2.36, 8.3.37, 8.4.28, 8.5.13, or 8.6.0 and restart.

Adam Hale, ZeroDay Times editorBy Adam Hale4 min read

Still life for “PHP CVE-2026-126714: phpAfterShell scores 9.2”: an open rack and a red lock, warm paper, PHP mark, signal CVE-2026-126714. [ ZERO-DAY ] badge.

On November 19, 2026, the PHP project published fixes for CVE-2026-126714, a critical flaw in the default file session handler that Depthfirst reported and that the researchers call phpAfterShell. The advisory, GHSA-fm2m-fjf5-v3cp, scores it 9.2 on CVSS 4.0. The vector is network, low complexity, no account, and no click from a victim, with a precondition on the host. Someone who can shape what a file-backed session stores, and who can stop a replacement write before it finishes, can make the next open rebuild objects from the mixed file. Where the application has a deserialization gadget chain, that code runs as the PHP worker. The same condition can corrupt session state, including which account the application treats as signed in. The November 19 advisory reports no exploitation. The project says the affected code has been in the handler since PHP 4.1.0.

What phpAfterShell does to PHP file sessions

The handler is files, the default of session.save_handler. Sessions kept in Redis, a database, or another store sit outside this particular write. The advisory still asks operators to judge those stores on their own if an update can stop halfway.

The vulnerable write puts the new session into the file that already holds the last one, and it does not clear that file first. A write that stops early can leave the front of the new save joined to the tail of the old one. The next open reads that mix as a real session. Upload progress is one way a remote client can place data in the session before the application’s own code runs. The advisory covers that path and every other path that stores attacker-controlled data in a file session, on PHP 8.6 as well as on the older supported branches. Whether the client must already hold an account depends on how that application opens sessions.

The fixed releases empty the session file before the replacement write and stop if that step fails. A cut-off write can still drop the session. What remains is the new save, or an empty file if the write stops.

These packages also close CVE-2026-115560, the serializer mismatch from the November 19 window. Hosts that already set upload progress off while waiting on that briefing still need this build. The advisory says that switch removes the upload path. Applications that store attacker-controlled session data on their own stay exposed until the package is the one serving traffic.

The October packages that closed PHP2Shell, 8.2.35, 8.3.36, 8.4.27, and 8.5.12, sit below the fixed versions in this advisory. A gateway or other appliance that embedded one of those builds, including the Check Point gateways rooted through CVE-2026-123039, moves when the vendor ships a build that contains CVE-2026-126714.

Which PHP builds CVE-2026-126714 still hits

GHSA-fm2m-fjf5-v3cp lists everything before 8.2.36, PHP 8.3.0 through 8.3.36, 8.4.0 through 8.4.27, and 8.5.0 through 8.5.12. The PHP 8 changelog dates the fixed releases November 19, 2026: 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0. Each of those entries names this advisory under Session. PHP 8.1 and older are outside security support. Move those hosts onto a supported branch. Security support for PHP 8.2 ends on December 31, 2026, so the 8.2.36 install is also the moment to schedule 8.3 or a newer branch.

A distribution package can carry the fix while the binary still prints an older upstream version. Match the installed package to that distributor’s advisory for CVE-2026-126714. A container is patched when the new image is the process answering requests. A managed WordPress host that updates the CMS on its own still needs this runtime check. The WordPress 7.1.4 install replaces WordPress. The PHP binary beside it stays until someone replaces that binary.

Restart PHP after the phpAfterShell package

Install the fixed build for the branch you run, then restart every worker. PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed each keep a process that holds the old binary until that restart. After it comes back, read the version the live worker reports. On the 8.2 line, anything older than 8.2.36 is still the vulnerable build. On 8.3, 8.4, 8.5, and 8.6, the fixed builds are 8.3.37, 8.4.28, 8.5.13, and 8.6.0.

Until that package is what is serving traffic, set session.upload_progress.enabled to 0 where the application does not use upload progress, and restart the workers so they read the new value. Limit how much untrusted data the application writes into the session. Those two steps are temporary. For the files handler, the advisory’s fix is the update. A store that replaces a session record in one step avoids this file-write defect. Sites that keep the default handler still take the PHP update.

Confirm session.save_handler on every pool, including the pool a panel or an image set beside the php.ini you edited last. Shared hosts, agency fleets, and images built by someone else belong in the same pass.

This briefing relies on the PHP project’s advisory GHSA-fm2m-fjf5-v3cp, the PHP 8 changelog, Depthfirst’s report, and public reporting by The Hacker News.

Sources

Share

Corrections and tips:[email protected]