phpAfterShell on Ubuntu and Debian: CVE-2026-126714 Fix
by Danila Vershinin,
See Everpatch coverage.
phpAfterShell on Ubuntu and Debian is a problem for the releases that no longer get free updates: on November 20, 2026 Ubuntu 20.04 had no fixed PHP package, Ubuntu 18.04 had one only for Ubuntu Pro subscribers, and Debian 10 had none. GetPageSpeed ships the fix for CVE-2026-126714 on all three, as an apt upgrade of the PHP packages you already run.
Patched for PHP2Shell in October? That does not cover this one. Paste the output of dpkg -l 'php*' into the phpAfterShell checker: it reads distro backports and tells a PHP2Shell-only build from one with both fixes. On CentOS 7, see phpAfterShell on CentOS 7.

CVE-2026-126714 RCE via partially overwritten session files (GHSA-fm2m-fjf5-v3cp) CVSS v4.0 9.2
Name: phpAfterShell (depthfirst, November 19, 2026)
Fixed upstream: 8.5.13, 8.4.28, 8.3.37, 8.2.36 only
Ubuntu 20.04: GetPageSpeed php7.4 php8.0 php8.1 php8.2 php8.3 php8.4
Ubuntu 18.04: GetPageSpeed php7.2
Debian 10: GetPageSpeed php7.3
Free to install; commercial production use requires a subscription. Without one, a small license notice appears on HTML pages after 30 days.
How to fix phpAfterShell on Ubuntu 20.04 and 18.04
Add the GetPageSpeed repository, then upgrade the PHP branch you already run:
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
Replace 7.4 with your branch: 8.0 to 8.4 on Ubuntu 20.04, 7.2 on Ubuntu 18.04. Running Apache mod_php? Restart apache2 instead. Running workers keep the old code in memory until they restart, so the restart is part of the fix.
The packages upgrade stock Ubuntu PHP and Surý installs in place, with the same package names. The GetPageSpeed build wins over Ubuntu’s own candidate, so apt upgrade picks it without pinning.
How to fix phpAfterShell on Debian 10
Debian 10 has left the main mirrors, so apt update fails first with The repository 'http://deb.debian.org/debian buster Release' does not have a Release file. Point apt at the archive first: edit /etc/apt/sources.list so that its Debian lines read
deb http://archive.debian.org/debian buster main
deb http://archive.debian.org/debian-security buster/updates main
Then install as on Ubuntu:
sudo apt update
wget https://extras.getpagespeed.com/release-latest.deb
sudo apt install ./release-latest.deb
sudo apt update
sudo apt upgrade 'php7.3-*'
sudo systemctl restart php7.3-fpm
Which build carries the fix
The upstream PHP version in these packages does not change: the fix is carried as a patch, and the package revision moves. A version ending in +stable.5 or later has it.
| System | PHP | First build with the fix |
|---|---|---|
| Ubuntu 20.04 | 7.4 | 1:7.4.33-31+gps1+ubuntu2004+stable.5 |
| Ubuntu 20.04 | 8.0 | 1:8.0.30-25+gps1+ubuntu2004+stable.5 |
| Ubuntu 20.04 | 8.1 | 8.1.34-9+gps1+ubuntu2004+stable.5 |
| Ubuntu 20.04 | 8.2 | 8.2.35-1+gps1+ubuntu2004+stable.5 |
| Ubuntu 20.04 | 8.3 | 8.3.36-1+gps1+ubuntu2004+stable.5 |
| Ubuntu 20.04 | 8.4 | 8.4.27-1+gps1+ubuntu2004+stable.5 |
| Ubuntu 18.04 | 7.2 | 7.2.34-66+gps1+ubuntu1804+stable.5 |
| Debian 10 | 7.3 | 7.3.33-35+gps1+deb10+stable.5 |
PHP 8.2, 8.3 and 8.4 show the October upstream version here (8.2.35, 8.3.36, 8.4.27) with the November fixes applied on top. A scanner that reads only the PHP version number will call them unfixed; the changelog check below settles it.
Check whether phpAfterShell on Ubuntu or Debian is fixed
List the installed version:
dpkg -l 'php7.4*' | awk '/^ii/{print $2, $3}'
php7.4-cli 1:7.4.33-31+gps1+ubuntu2004+stable.5
php7.4-common 1:7.4.33-31+gps1+ubuntu2004+stable.5
php7.4-fpm 1:7.4.33-31+gps1+ubuntu2004+stable.5
Then confirm that the changelog of the installed package names the CVE:
zcat /usr/share/doc/php7.4-common/changelog.Debian.gz | grep -m1 CVE-2026-126714
A line of output means the fix is installed. Use zcat as shown: on Ubuntu, apt changelog php7.4-common fails for these packages with Changelog unavailable.
One detail can mislead a check. php -i still shows session.upload_progress.enabled => On. On PHP 7.2 to 8.1 the feature has been off in the code since the October PHP2Shell build, whatever the setting says.
What phpAfterShell is
The PHP project published the advisory for CVE-2026-126714 on November 19, 2026. The security firm depthfirst, which found the flaw, named it phpAfterShell.
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. 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().
The PHP advisory says a suitable gadget chain in the application is needed to turn this into code execution. depthfirst reports a full chain that needs no application class. Plan for the worse case. No exploitation in the wild had been reported on November 20, 2026.
Why these releases have no vendor fix
The PHP project fixed only 8.2 and newer. This is what the vendors’ own trackers showed on November 20, 2026. It is a record of that day, not a live feed:
- Ubuntu fixed 18.04 and 16.04 for Ubuntu Pro subscribers, and listed 20.04, 22.04 and 24.04 as needing triage, with no fixed package (tracker). On 20.04 and 18.04 the GetPageSpeed packages in this article carry the fix.
- Debian fixed Debian 12 (
8.2.36-1~deb12u1) and Debian 13 (8.4.28-1~deb13u1), and listed nothing for older releases (tracker). On Debian 10 the GetPageSpeed php7.3 packages carry the fix.
On Debian 12 and 13, a plain sudo apt update && sudo apt upgrade installs Debian’s own fix. On Ubuntu 22.04 and 24.04, watch the tracker and apply the stopgap below until a fixed package lands.
The stopgap is partial
If you cannot upgrade today, switch session upload progress off in php.ini, 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.
FAQ
Is PHP 7.4 on Ubuntu 20.04 affected by CVE-2026-126714?
Yes. Every PHP before 8.2.36 is affected, and on November 20, 2026 Ubuntu listed php7.4 on 20.04 as needing triage, with no fixed package. The GetPageSpeed build 1:7.4.33-31+gps1+ubuntu2004+stable.5 carries the fix and installs with apt upgrade 'php7.4-*'.
I patched PHP2Shell in October. Am I covered?
No. phpAfterShell is a separate flaw with a separate fix. A build from October has the PHP2Shell fix only. The revision that adds this fix is +stable.5.
Do I need Ubuntu Pro?
Not for this. Ubuntu Pro had fixed packages for 18.04 and 16.04 on November 20, 2026, and none for 20.04. The GetPageSpeed packages need no Ubuntu Pro subscription.
Do I need a subscription to fix phpAfterShell on Ubuntu or Debian?
Not for personal, development or evaluation use: the packages install from the public GetPageSpeed repository with no signup. Commercial production use requires GetPageSpeed Ultra ($500/year, up to 10 servers running your own services) under the repository terms. Administering servers for clients, or more than 10? GetPageSpeed Fleet starts at $800/year.
Conclusion
phpAfterShell on Ubuntu 20.04, 18.04 and Debian 10 has no vendor fix that every server can install. The GetPageSpeed packages close that gap for PHP 7.2 to 8.4 with one apt upgrade, in place.
Running these servers for a business? Commercial production use requires GetPageSpeed Ultra ($500/year, up to 10 servers). Two critical PHP releases landed within a month, and each one has to be ported again to branches upstream abandoned years ago. Ultra funds that work and tells you when the next fix is ready for the PHP your servers run.