Disclosed November 19, 2026. Updated
phpAfterShell checker: check, fix and mitigate
- CVE-2026-126714
- CVSS 4.0 9.2
phpAfterShell is a flaw in the way PHP stores sessions in files. An interrupted session write can leave attacker-supplied bytes in the file, and PHP turns them into objects on the next request. Every PHP before 8.2.36, 8.3.37, 8.4.28 and 8.5.13 is affected, and a PHP2Shell patch does not fix it.
Install fixed PHP on CentOS 7
Replace php74 with your version, from php54 to php85
yum -y install https://extras.getpagespeed.com/release-latest.rpm yum --enablerepo=getpagespeed-extras-php74 upgrade 'php-*' systemctl restart php-fpm
Free to install. Personal, development and evaluation use is free; running it for a business needs a subscription.
Subscribe to keep security fixes coming Collections, Ubuntu and Debian builds
When a new fix is ready for the PHP your servers run, we email you the exact command.
Is my server patched?
A free phpAfterShell checker that knows about distro backports, so it can tell a fixed package from an old PHP version number. It also tells a PHP2Shell-only patch from a build with both fixes.
Fixed upstream in 8.5.13 8.4.28 8.3.37 8.2.36. PHP 8.1 and older got no release: they need a vendor backport, such as the GetPageSpeed builds for CentOS 7, Ubuntu and Debian (free to install).
A PHP2Shell patch does not fix phpAfterShell
PHP2Shell (CVE-2026-109618 and CVE-2026-109619, October 21, 2026) and phpAfterShell (CVE-2026-126714, November 19, 2026) are separate flaws with separate fixes. The October fix restricted what PHP may do while it tracks an upload. It left the session file write itself unchanged, and that is where phpAfterShell lives.
| Your PHP build | PHP2Shell | phpAfterShell |
|---|---|---|
| Upstream 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and distribution packages based on them | Fixed | Not fixed Upgrade to 8.2.36, 8.3.37, 8.4.28 and 8.5.13. |
| GetPageSpeed PHP 5.4 to 8.1, October builds | Fixed | Not fixed Harder to reach: these builds switch session upload progress off, which closes the easiest route. The session file write is still the old one, so upgrade to the November build. |
| GetPageSpeed November builds, upstream 8.2.36, 8.3.37, 8.4.28 and 8.5.13 | Fixed | Fixed Both fixes are in. |
On the GetPageSpeed PHP 5.4 to 8.1 builds, session.upload_progress.enabled still reads On in php -i. The feature has been switched off in the code since the October build, whatever the setting says.
The checker on this page reads both fixes. So does the PHP2Shell checker, which now adds a phpAfterShell verdict to its answer.
How to fix phpAfterShell on your platform
Updating PHP is the only complete fix. Install a build that carries it, then restart every PHP process: running workers keep the old code in memory until they restart.
The table records what each vendor's own tracker showed on November 20, 2026. It is not a live feed: follow the tracker link in a row for the current state.
| Vendor | Status on November 20, 2026 | Where our packages fill the gap |
|---|---|---|
| PHP project | Partly fixed Released 8.2.36, 8.3.37, 8.4.28 and 8.5.13 on November 19, 2026. PHP 8.1 and older are end of life and got no release. Tracker | |
| GetPageSpeed | Fixed Published fixed builds of PHP 5.3 to 8.5 on November 19, 2026: CentOS 7 and CentOS 6, the php56, php70 and php71 collections for EL8 and EL9, Amazon Linux 2 (7.2 and 7.4), Ubuntu 18.04 and 20.04, and Debian 10. | |
| Debian | Partly fixed Fixed in bookworm-security (8.2.36-1~deb12u1) and trixie-security (8.4.28-1~deb13u1). The tracker listed no fix for older releases. Tracker | Debian 10: the GetPageSpeed php7.3 packages carry the fix. |
| Ubuntu | Partly fixed 16.04 and 18.04 were fixed for Ubuntu Pro subscribers only. 20.04, 22.04, 24.04 and 26.04 were listed as needing triage, with no fixed package. Tracker | Ubuntu 18.04 and 20.04: the GetPageSpeed php7.2 to php8.4 packages carry the fix. |
| Red Hat, AlmaLinux, Rocky Linux | No fix yet Red Hat listed PHP on RHEL 7, 8, 9 and 10 as affected and had released no fixed package. AlmaLinux and Rocky Linux rebuild Red Hat's packages. Tracker | RHEL and CentOS 7: the GetPageSpeed PHP 5.4 to 8.5 packages carry the fix. EL8 and EL9: so do the php56, php70 and php71 collections. |
| Remi | Partly fixed Released 8.2.36, 8.3.37, 8.4.28 and 8.5.13 for Enterprise Linux 8 and newer. Remi stopped building for CentOS 7 in June 2024. | CentOS 7: the GetPageSpeed packages are drop-in compatible and carry the fix. |
| Amazon Linux | Partly fixed Fixed php8.2 to php8.5 on Amazon Linux 2023 and the php8.2 extras topic on Amazon Linux 2. Core PHP on Amazon Linux 2 and php8.1 on Amazon Linux 2023 were marked No Fix Planned. Tracker | Amazon Linux 2: the GetPageSpeed PHP 7.2 and 7.4 packages carry the fix. |
| Alpine Linux | Partly fixed Fixed php83 (8.3.37-r0), php84 (8.4.28-r0) and php85 (8.5.13-r0). php82 was not listed. Tracker | |
| cPanel EasyApache 4 | Partly fixed EasyApache 4 25.98 of November 19, 2026 updated PHP to 8.2.36, 8.3.37, 8.4.28 and 8.5.13. Its release note named no fix for ea-php81 and older. | |
| CloudLinux | No fix yet We found no CloudLinux announcement of alt-php or ea-php builds with this fix. |
Debian and Ubuntu
sudo apt update
sudo apt install --only-upgrade $(dpkg -l 'php*' | awk '/^ii/{print $2}')
sudo systemctl restart 'php*-fpm.service' apache2
RHEL, AlmaLinux, Rocky Linux
sudo dnf upgrade 'php*' sudo systemctl restart php-fpm httpd
Confirm the fix is installed
A fixed distribution package names the CVE in its changelog, whatever PHP version it reports:
rpm -q --changelog php-common | grep CVE-2026-126714 zcat /usr/share/doc/php8.3-common/changelog.Debian.gz | grep CVE-2026-126714
EOL PHP: fixed builds for CentOS 7, Ubuntu and Debian
PHP 8.1 and older will never get this fix from the PHP project. GetPageSpeed ships it for every PHP from 5.3 to 8.5 on the systems that still run them. The builds are drop-in compatible with the Remi and Surý package layouts, so an upgrade keeps your package names, extensions and configuration.
CentOS 7, base package names
yum -y install https://extras.getpagespeed.com/release-latest.rpm yum --enablerepo=getpagespeed-extras-php74 upgrade 'php-*' systemctl restart php-fpm
Replace php74 with your version, from php54 to php85. The channel is enabled for this transaction only.
CentOS 7, software collections
yum -y install https://extras.getpagespeed.com/release-latest.rpm yum upgrade 'php74-php*' systemctl restart php74-php-fpm
Collection builds (php74-php and the like) come from the main GetPageSpeed repository, so no extra channel is needed.
Ubuntu 20.04, 18.04 and Debian 10
wget https://extras.getpagespeed.com/release-latest.deb sudo apt install ./release-latest.deb sudo apt update && sudo apt upgrade 'php7.4-*' sudo systemctl restart php7.4-fpm
PHP 7.4 to 8.4 for Ubuntu 20.04, PHP 7.2 for Ubuntu 18.04 and PHP 7.3 for Debian 10. They upgrade stock and Surý installs in place.
Afterwards php -v prints Built by GetPageSpeed LLC with the build release, and rpm -q --changelog php-common | grep CVE-2026-126714 finds the fix.
- Free to install. No account, no signup; personal, development and evaluation use is free. Running it for a business needs a subscription: see the plans.
- Verified on CentOS 7. The fixed build names CVE-2026-126714 in its changelog. CVEfox reports the build before it as open and this one as fixed.
- Told when the next fix lands. Subscribers get an email with the exact command when a new fix is ready for the PHP their servers run.
- More than one CVE. The same builds carry the rest of the November 19, 2026 PHP security release. The CVE list of each PHP version is linked from the CentOS 7 page.
| PHP | CentOS 7 | Other platforms |
|---|---|---|
| 5.3 |
CentOS 6: 5.3.3-57.el6 |
|
| 5.4 | 5.4.45-29.el7 |
|
| 5.6 | 5.6.40-54.el7 |
EL8 collection: 5.6.40-54.el8EL9 collection: 5.6.40-54.el9 |
| 7.0 | 7.0.33-56.el7 |
CentOS 6: 7.0.33-56.el6EL8 collection: 7.0.33-56.el8 |
| 7.1 | 7.1.33-46.el7 |
CentOS 6: 7.1.33-46.el6EL8 collection: 7.1.33-46.el8 |
| 7.2 | 7.2.34-41.el7 |
Amazon Linux 2: 7.2.34-41.amzn2Ubuntu 18.04: 7.2.34-66+gps1+ubuntu1804+stable.5 |
| 7.3 | 7.3.33-35.el7 |
Debian 10: 7.3.33-35+gps1+deb10+stable.5 |
| 7.4 | 7.4.33-45.el7 |
Amazon Linux 2: 7.4.33-45.amzn2Ubuntu 20.04: 7.4.33-31+gps1+ubuntu2004+stable.5 |
| 8.0 | 8.0.30-32.el7 |
Ubuntu 20.04: 8.0.30-25+gps1+ubuntu2004+stable.5 |
| 8.1 | 8.1.34-16.el7 |
Ubuntu 20.04: 8.1.34-9+gps1+ubuntu2004+stable.5 |
| 8.2 | 8.2.36-1.el7 |
Ubuntu 20.04: 8.2.35-1+gps1+ubuntu2004+stable.5 |
| 8.3 | 8.3.37-1.el7 |
Ubuntu 20.04: 8.3.36-1+gps1+ubuntu2004+stable.5 |
| 8.4 | 8.4.28-1.el7 |
Ubuntu 20.04: 8.4.27-1+gps1+ubuntu2004+stable.5 |
| 8.5 | 8.5.13-1.el7 |
If you cannot upgrade today
Switch session upload progress off in php.ini or the pool configuration, then restart PHP:
session.upload_progress.enabled = 0
- Set it in the server configuration. A call to
ini_set()from the application runs too late. - It closes the easiest route only. The PHP project notes that an application which stores large user-controlled strings in a session can reach the same defect without upload progress.
- Sessions kept in Redis or a database are not affected by the file-write defect. Moving session storage is a bigger change than the upgrade, so treat it as a design choice, not a hotfix.
- Keep less untrusted data in sessions where you can.
See what your PHP uses. The command line can read a different php.ini than PHP-FPM or Apache, so a phpinfo() page is the final word for the web server.
php -i | grep -E 'session\.(save_handler|upload_progress\.enabled)'
How phpAfterShell works
PHP's default session handler keeps each session in a file. Before the fix it wrote new session data over the old file and cut the file short only when the new data was shorter. If that write was interrupted, the file could keep the start of the new session followed by the end of the old one.
PHP reads a session file as a list of records. Leftover bytes that an attacker placed in an earlier session can then be read as serialized objects, and PHP creates them on the next session_start(). That step is what leads to code execution.
Three things have to line up:
- Session storage in files, which is the default.
- A way to put chosen bytes into a session. Session upload progress, on by default until the November release, gives an unauthenticated visitor one. An application that stores large user-supplied strings in a session gives another.
- A write that fails part-way. The PHP project describes a hard memory-limit failure in threaded builds, and the researchers report an out-of-memory kill.
The sources disagree on one point. The PHP advisory says a suitable gadget chain in the application is needed to turn this into code execution. depthfirst, who found the flaw, report a full chain that needs no application class. Plan for the worse case.
The fix is small: PHP now empties the session file before every write, and fails the write if it cannot.
Can I detect exploitation?
Not reliably. On November 20, 2026 neither the PHP project nor the researchers had published log indicators or a detection rule, and no exploitation in the wild had been reported.
Two things are worth a look on a server that was exposed. Neither is proof.
- PHP workers killed for memory, in the kernel log and the php-fpm log:
dmesg -T | grep -i -E 'out of memory|killed process'
- Upload requests that carry the
PHP_SESSION_UPLOAD_PROGRESSform field when your application does not use upload progress. That is PHP's default field name. Request bodies are not in access logs, so this needs a WAF or an application log.
Patching does not undo a compromise. If you suspect one, rotate secrets and rebuild from a known-good state.
phpAfterShell timeline
- PHP2Shell is disclosed and fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
- The PHP project publishes the advisory for CVE-2026-126714 with 8.5.13, 8.4.28, 8.3.37 and 8.2.36. depthfirst publishes its write-up and names the flaw phpAfterShell.
- GetPageSpeed publishes fixed builds of PHP 5.3 to 8.5 for CentOS 7 and 6, EL8 and EL9 collections, Amazon Linux 2, Ubuntu 18.04 and 20.04, and Debian 10.
- By this date Debian had fixed bookworm and trixie, Remi and cPanel EasyApache 4 had shipped the new upstream releases, and Ubuntu had fixed 16.04 and 18.04 for Ubuntu Pro. Red Hat listed RHEL 7 to 10 as affected, with no fixed package.
- This page last updated.
Need hands-on help?
Stuck on an old platform, a fleet you cannot patch by hand, or a server you suspect is compromised? GetPageSpeed engineers patch, harden and monitor production PHP and NGINX servers.
See Server CarephpAfterShell FAQ
What is phpAfterShell?
phpAfterShell is the name the security firm depthfirst gave to CVE-2026-126714, a flaw in PHP's file-based session storage disclosed on November 19, 2026. An interrupted session write can leave old bytes in a session file, and PHP can then create objects from them on the next request. The PHP project rates it CVSS 4.0 9.2.
Is phpAfterShell the same as PHP2Shell?
No. PHP2Shell is CVE-2026-109618 and CVE-2026-109619, fixed in October 2026. phpAfterShell is a separate flaw with a separate fix. A server patched for PHP2Shell is still affected by phpAfterShell unless its PHP build also carries the November fix.
Which PHP versions are affected by phpAfterShell?
Every PHP release before 8.2.36, 8.3.37, 8.4.28 and 8.5.13. The PHP project says the affected code has been present since PHP 4.1. PHP 8.1 and older are end of life and got no upstream release, so they need a vendor backport, such as the GetPageSpeed builds for CentOS 7, Ubuntu and Debian.
How do I fix phpAfterShell on PHP 7.4 or another EOL version?
Install a build with the fix backported. GetPageSpeed publishes one for every PHP from 5.3 to 8.5: on CentOS 7 it is a yum upgrade that keeps your package names, and on Ubuntu 18.04, 20.04 and Debian 10 an apt upgrade. Ubuntu Pro covers 16.04 and 18.04. The vendor table on this page records what each of the others had shipped on November 20, 2026.
Does disabling session upload progress fix phpAfterShell?
It closes the easiest route, not the flaw. Set session.upload_progress.enabled = 0 in php.ini, because ini_set() in the application is too late. An application that stores large user-controlled strings in a session can still reach the defect, so the upgrade is still needed.
Am I affected if sessions are stored in Redis or a database?
Not by this defect. It is in the handler that writes session files, and both depthfirst and Red Hat say that storage which replaces a session record in one step is not affected. The November 19, 2026 PHP release fixes other flaws too, so the upgrade still applies to you.
Is phpAfterShell being exploited?
No exploitation had been reported on November 20, 2026, and the researchers withheld the last stages of their exploit. PHP2Shell was attacked within days of its disclosure, so do not wait for reports.
Are the GetPageSpeed PHP packages free?
They are free to install, and personal, development and evaluation use is free. Running them for a business needs a subscription.
References
- GHSA-fm2m-fjf5-v3cp: CVE-2026-126714, partially overwritten session files can lead to remote code execution (PHP security team)
- CVE-2026-126714 on cve.org
- PHP release announcements: 8.5.13 , 8.4.28 , 8.3.37 , 8.2.36
- phpAfterShell write-up (depthfirst)
- phpAfterShell on CentOS 7: the step-by-step guide
- PHP security release of November 2026: every fix in it (GetPageSpeed)
- PHP2Shell checker (GetPageSpeed)
- CVEfox: command-line PHP CVE scanner (GetPageSpeed)