--- title: "phpAfterShell CVE-2026-126714: PHP Session RCE, Patch Now" url: https://playciso.com/blog/phpaftershell-cve-2026-126714 updated: 2026-11-21 section: Blog publisher: PlayCISO --- # phpAfterShell CVE-2026-126714: PHP Session RCE, Patch Now > phpAfterShell (CVE-2026-126714, CVSS 9.2) turns interrupted PHP session writes into RCE past the PHP2Shell fix. Fixed in 8.5.13, 8.4.28. What to do. Source: https://playciso.com/blog/phpaftershell-cve-2026-126714 · Published: 2026-11-19 · Publisher: PlayCISO (https://playciso.com) Primary source: https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp --- **PHP fixed a critical session flaw today that its researchers say gets around the October PHP2Shell patch.** On **19 November 2026** depthfirst researcher Yuhang Wu published [phpAfterShell: From Interrupted Session Writes to Remote Code Execution](https://depthfirst.com/research/phpaftershell), and PHP released **8.5.13, 8.4.28, 8.3.37 and 8.2.36** with advisory [GHSA-fm2m-fjf5-v3cp](https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp) for **CVE-2026-126714**, "Partially overwritten session files can lead to remote code execution", rated **CVSS v4.0 9.2 (critical)**. PHP's default file-based session storage can be left holding pieces of two sessions when a write is interrupted, and a later request reads that back as data an attacker shaped. No exploitation is reported, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. **Who this is for:** CISOs, vulnerability-management and platform leads, and anyone who runs PHP web servers, PHP container images or products that ship their own PHP. *Based on PHP's advisory, the CVE record, php.net, the PHP ChangeLog and manual, and depthfirst's post, all read on 19 November 2026. PlayCISO is not affiliated with depthfirst or the PHP project. We explain the flaw class only and publish no exploit details.* Confirmed vs not yet known **PHP confirms:** CVE-2026-126714 in the session extension, CVSS v4.0 9.2, affecting 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13, fixed in those releases on 19 November 2026. PHP says the affected code has been present since PHP 4.1.0 and that the issue is "not limited to session upload progress". **depthfirst says:** the write can be driven by an unauthenticated multipart request through session upload progress, with no upload controller or `session_start()` on that endpoint; it bypasses the PHP2Shell fix; and chained with a memory-corruption bug in a PHP-native class it reached remote code execution. **CISA:** its enrichment of the CVE record (19 November) says "Exploitation: none", "Automatable: no", "Technical impact: total". Not in the KEV catalog when we checked. **Not established:** which PHP-native class depthfirst used and whether that bug has its own CVE (depthfirst names neither); whether any of the other memory-safety fixes in today's release is that bug; and any in-the-wild use. ## Affected and fixed PHP versions | Branch | Affected (PHP advisory and CVE record) | Fixed release (19 Nov 2026) | | --- | --- | --- | | PHP 8.5 | 8.5.0 to before 8.5.13 | 8.5.13 | | PHP 8.4 | 8.4.0 to before 8.4.28 | 8.4.28 | | PHP 8.3 | 8.3.0 to before 8.3.37 | 8.3.37 | | PHP 8.2 | before 8.2.36 | 8.2.36 (8.2 reaches end of life on 31 December 2026) | | PHP 8.6 | Release candidates (per depthfirst) | 8.6.0, released the same day; the fix is listed in its ChangeLog | | PHP 8.1, 8.0, 7.4 | Not in the CVE record's ranges, but PHP says the code dates from 4.1.0, and depthfirst says unpatched builds keep the original behaviour | No updates from the PHP project; ask your distribution or LTS vendor | - Severity: CVSS v4.0 9.2 from PHP, vector AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H: network, low complexity, attack requirements present, no privileges, no user interaction. Weaknesses CWE-367 and CWE-662. - The fix: PHP says the handler now truncates the file before writing and aborts if truncation fails. - Conditions: the files save handler, which the PHP manual lists as the default. The manual also says session.upload_progress.enabled defaults to 1, and php.ini-production leaves that line commented out. On 18 November php.net said the critical issues in this release "require either non-default configuration or uncommon setups"; PHP's vector marks attack requirements as present. Check your own settings rather than relying on either statement. - Distribution packages may carry the fix under a different version string, and depthfirst notes downstream packages can include related changes without changing PHP_VERSION. Check your vendor's advisory. - depthfirst's version table is dated 17 November, before the releases, so it lists 8.4.28 and 8.5.13 release candidates as affected. PHP's advisory lists the final 8.4.28 and 8.5.13 as patched. ## How the flaw works, in plain terms PHP stores each session in a file and rewrites it when the session changes. PHP says the default handler wrote new data over the existing file without clearing it first. If the PHP worker dies or is stopped partway through that update, the file can end up with the beginning of the new session followed by the end of the old one. That spliced file can still decode as a valid session, and when a later request calls `session_start()`, PHP turns ordinary text into objects. If the application, or PHP itself, offers a suitable object chain, that becomes code execution. depthfirst's route in is **session upload progress**: when it is on, PHP writes progress data into the session while it is still parsing a multipart request, before any application code runs. depthfirst describes two orderings of the interrupted update across PHP versions (separated by commit c2b02f24dff) and says the later change moved the window without closing it. We do not describe how the interruption is caused or how the data is laid out. ## How it relates to PHP2Shell [PHP2Shell](/blog/php2shell-ai-agent-credential-harvesting) (CVE-2026-109618 and CVE-2026-109619) was fixed on 21 October and is in CISA's KEV catalog. depthfirst says the October fix restricted which classes PHP resolves during the upload-progress step, so objects stay inert there. It did not change the file write itself. A spliced file is decoded later, in an ordinary request where that restriction does not apply, which is why depthfirst calls it a bypass. The October releases (8.5.12, 8.4.27, 8.3.36, 8.2.35) are therefore affected by CVE-2026-126714. Two other session advisories shipped today. [CVE-2026-115560](https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx) (session serializer mismatch, the issue behind PHP's 23 October advice to turn upload progress off) is fixed by disabling upload progress by default, per PHP. [CVE-2026-129481](https://github.com/php/php-src/security/advisories/GHSA-g3vh-838c-65v7) (use-after-free after interrupted session shutdown, 8.3 to 8.5) is described by PHP as an incomplete fix for CVE-2026-109619; PHP says disabling upload progress does not mitigate that one. ## What else the 19 November releases fix php.net's release posts call each one "a security release" without listing CVEs; the PHP 8 ChangeLog does. By our count it lists 18 CVE IDs for 8.5.13 (and 8.6.0), 14 for 8.4.28, 13 for 8.3.37 and 12 for 8.2.36. Besides the three session advisories, they include PHP-FPM request smuggling (CVE-2026-129289) and an FPM use-after-free that can lead to local privilege escalation (CVE-2026-129291), a PHP-CGI out-of-bounds read and write (CVE-2026-129538), a PHAR signature bypass (CVE-2026-128090), and use-after-free and double-free bugs in DOM, Date and SOAP. php.net said the highest severity is CRITICAL. Take the whole release, not just this CVE. Our [PHP 8.5.13 security release post](/blog/php-security-release-8-5-13-cve-2026-129289) covers the FPM request smuggling flaw, the PHP 8.5-only CVE-2026-129474 and CVE-2026-115560, and the settings that decide exposure to each. ## Timeline | Date | Event | Source | | --- | --- | --- | | 21 Oct 2026 | PHP fixes PHP2Shell (CVE-2026-109618, CVE-2026-109619) in 8.5.12, 8.4.27, 8.3.36 and 8.2.35 | php.net | | 23 Oct 2026 | PHP informational advisory: set session.upload_progress.enabled=0 against an "unlikely RCE vector" (CVE-2026-115560) | php.net | | 11 Nov 2026 | CVE-2026-126714 reserved by PHP as CNA | CVE record | | 17 Nov 2026 | Cut-off date of depthfirst's affected-version table | depthfirst | | 18 Nov 2026 | PHP announces security releases for 19 November, 14:00-14:30 UTC, highest severity CRITICAL | php.net | | 19 Nov 2026 | PHP releases 8.5.13, 8.4.28, 8.3.37 and 8.2.36 (and 8.6.0); advisory GHSA-fm2m-fjf5-v3cp published; CVE record published 14:43 UTC | php.net, PHP advisory, CVE record | | 19 Nov 2026 | depthfirst publishes phpAfterShell | depthfirst | | 19 Nov 2026 | CISA enrichment: "Exploitation: none", "Automatable: no", "Technical impact: total" | CVE record | ## What security leaders should do this week - Patch every PHP that serves web traffic. Move to 8.5.13, 8.4.28, 8.3.37 or 8.2.36 (or your distribution's fixed package) and restart PHP-FPM and the web server. Check the version the web server actually loads, not just php -v. If you stopped at the October PHP2Shell releases, you are still exposed. - Rebuild container images. Images built on an official or distro PHP base keep the old PHP until rebuilt and redeployed. Include products that ship their own PHP and ask those vendors for their fixed build. - Check two settings. Look for session.upload_progress.enabled and session.save_handler in php.ini, FPM pools, vhosts and .user.ini files. If nothing uses upload progress bars, turn it off administratively (not with ini_set()) and restart workers. PHP says the November fix for CVE-2026-115560 makes off the default, but an explicit =1 overrides it. - Treat the setting as a bridge, not a fix. PHP says disabling upload progress removes one input path but does not protect applications that put large user-controlled strings into sessions. Limit untrusted data in sessions, and if you move sessions to another store, PHP's advice is one that replaces records atomically. - Unsupported PHP (8.1 and older): get a vendor-supported build or plan the upgrade now, and record the exception with an owner and a date in your [risk register](/tools/risk-register). - Prioritise with data. It is not in KEV today, but a working chain is public knowledge. Use the [SSVC calculator](/tools/ssvc-calculator) and the [vulnerability prioritizer](/tools/vulnerability-prioritizer) to set the deadline, and re-check KEV during the week. Neither PHP nor depthfirst has published indicators for spotting a spliced session file, so we do not suggest a hunt for one. If you are still cleaning up after PHP2Shell, follow our [PHP2Shell checklist](/blog/php2shell-ai-agent-credential-harvesting). For the PHP project's entry with both issues, see [PHP in the Breach Index](/breach-index/php). phpAfterShell is a vulnerability in PHP, not a breach of the PHP project. ## Frequently asked questions ### What is phpAfterShell? phpAfterShell is the name depthfirst gave to CVE-2026-126714, a critical flaw in PHP's session extension that PHP titles "Partially overwritten session files can lead to remote code execution". PHP's default files session handler writes new session data over the old file without clearing it first, so an interrupted write can leave a file that mixes two sessions and is later read back as attacker-shaped data. PHP rates it CVSS v4.0 9.2 and fixed it on 19 November 2026. ### Which PHP versions fix CVE-2026-126714? PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, released on 19 November 2026. PHP's advisory lists 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13 as affected. The fix is also in the PHP 8.6.0 ChangeLog. PHP 8.1 and older get no updates from the PHP project, so use your distribution or LTS vendor. ### Am I affected by phpAfterShell? Probably, if you run an unpatched PHP 8.2 to 8.5 web server with file-based sessions. The files save handler is PHP's default, and the PHP manual says session.upload_progress.enabled defaults to on. PHP's advisory says the issue is not limited to upload progress: applications that store large user-controlled strings in sessions can also be affected. Code execution additionally needs a usable object chain, which depthfirst supplied with a memory-corruption bug in a PHP-native class. ### Does phpAfterShell need a login or a file upload form? No, according to depthfirst. The request that writes the session data needs no authentication, and the endpoint needs no upload controller and no session_start() call, because PHP updates upload-progress session data itself while it parses the request. The harm comes when a later request with the same session ID calls session_start(), which is ordinary application behaviour. PHP's CVSS vector marks attack requirements as present. ### Why did the PHP2Shell fix not stop phpAfterShell? depthfirst says the October PHP2Shell fix restricted which classes PHP will resolve while it handles upload progress, so objects are kept inert during that step. It did not change how the session file is written. An interrupted write can leave bytes on disk that are only decoded later, in an ordinary request where that restriction no longer applies. ### Is CVE-2026-126714 being exploited? No exploitation has been reported. On 19 November 2026 CISA's enrichment of the CVE record said "Exploitation: none", "Automatable: no" and "Technical impact: total", and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. depthfirst published a full-chain demonstration, so expect that to change; patch on a short clock. ### Is there a workaround for phpAfterShell? PHP says to upgrade. Its partial measures: disable session.upload_progress.enabled if you do not need it (this removes one input path but does not protect applications that store attacker-controlled data in sessions), limit how much untrusted data goes into sessions, and use a session store that replaces records atomically. PHP notes another backend avoids this file-write defect but may handle interrupted updates in its own way. ### Does the November PHP release change upload progress defaults? Yes, per PHP's advisory for CVE-2026-115560, fixed in the same releases: the fix disables session upload progress by default and blocks runtime changes to session settings while it is enabled. An explicit session.upload_progress.enabled=1 in php.ini, an FPM pool or a vhost overrides the new default, so check for one. ### Was PHP hacked? No. phpAfterShell is a vulnerability in PHP, not a breach of php.net or the PHP project. The exposure is to organisations running unpatched PHP. ## Sources - [PHP security advisory GHSA-fm2m-fjf5-v3cp: Partially overwritten session files can lead to remote code execution (CVE-2026-126714), 19 November 2026](https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp) - [CVE.org: CVE-2026-126714](https://www.cve.org/CVERecord?id=CVE-2026-126714) (CNA PHP Group; affected ranges; CVSS v4.0 9.2; CISA enrichment) - [php.net news archive 2026: pre-announcement (18 November) and releases 8.5.13, 8.4.28, 8.3.37, 8.2.36 and 8.6.0 (19 November)](https://www.php.net/archive/2026.php) - [PHP 8 ChangeLog: security fixes in each 19 November release](https://www.php.net/ChangeLog-8.php) - [PHP advisory GHSA-658j-r8rw-q6mx (CVE-2026-115560)](https://github.com/php/php-src/security/advisories/GHSA-658j-r8rw-q6mx) and [GHSA-g3vh-838c-65v7 (CVE-2026-129481)](https://github.com/php/php-src/security/advisories/GHSA-g3vh-838c-65v7) - [PHP manual: session runtime configuration (defaults for session.upload_progress.enabled and session.save_handler)](https://www.php.net/manual/en/session.configuration.php) - [depthfirst (Yuhang Wu): phpAfterShell: From Interrupted Session Writes to Remote Code Execution, 19 November 2026](https://depthfirst.com/research/phpaftershell)