PHP2Shell on CentOS 7 is an emergency: CVE-2026-109618 and CVE-2026-109619 let an unauthenticated request take over a PHP server, and nobody ships a fixed PHP for CentOS 7 except GetPageSpeed. Every PHP version a CentOS 7 server can run, from the stock 5.4 to 8.4, now has a patched build in both Remi package shapes. Install it from the GetPageSpeed channel for your version and restart PHP-FPM.
Running another distribution, or not sure your build is patched? Paste your package list into the PHP2Shell checker. It understands distro backports and gives the fix for every platform. On Ubuntu 20.04, see PHP2Shell on Ubuntu 20.04. On Amazon Linux 2, including Graviton, see PHP2Shell on Amazon Linux 2. Still on CentOS 6? See PHP2Shell on CentOS 6.
CVE-2026-109618 RCE via out-of-memory corruption (GHSA-w8hw-w9fx-j79w) CVSS v4.0 9.2
CVE-2026-109619 RCE via stale global state (GHSA-6wmf-4rv5-p3rp) CVSS v4.0 9.2
Affected: PHP 5.4 and later, all web SAPIs (PHP-FPM, mod_php, php-cgi, LiteSpeed, FrankenPHP)
Fixed upstream: 8.5.12, 8.4.27, 8.3.36, 8.2.35 only
CentOS 7 fix: GetPageSpeed channels php54 php56 php70 php71 php72 php73 php74 php80 php81 php82 php83 php84
How to fix PHP2Shell on CentOS 7
CentOS 7 servers run Remi’s PHP in one of two shapes, and GetPageSpeed ships both for every version. Check which one you have:
rpm -qa 'php*-common' --qf '%{NAME}-%{VERSION}-%{RELEASE}\n'
Base-name packages (php-common-7.4.33-15.el7.remi, from remi-php74 and friends) replace the system PHP. Upgrade them from the channel for your version:
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: php54, php56, php70, php71, php72, php73, php80, php81, php82 or php83. Enable the channel only for the transaction, as shown: each channel carries base-name php of its own version.
Stock CentOS 7 PHP 5.4 (php-common-5.4.16-48.el7, the PHP CentOS 7 shipped by default) upgrades in place from the php54 channel to a patched 5.4.45-20.el7 with the same package names, configuration files and extension ABI, so CentOS-built extensions and the ionCube 5.4 loader keep loading. Include the mod_php package php in the upgrade:
yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum --enablerepo=getpagespeed-extras-php54 upgrade php 'php-*'
systemctl restart httpd
Software collections (php74-php-common-7.4.33-15.el7.remi, from remi-safe) live side by side under their own names. Their GetPageSpeed builds are in the always-enabled main repository, so no channel is needed:
yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum upgrade 'php74-php*'
systemctl restart php74-php-fpm
scl enable php74 -- php -v
For the other collections, replace php74 with php56 through php84 in all four places. Running Apache mod_php? Restart httpd instead of PHP-FPM. Afterwards php -v prints Built by GetPageSpeed LLC under the copyright line.
What PHP2Shell is
The PHP security team published two critical advisories on October 21, 2026, after announcing them a day earlier. Researchers named the pair PHP2Shell.
CVE-2026-109618, remote code execution via out-of-memory corruption. PHP handles an out-of-memory error by jumping out of whatever it was doing. If that happens during request startup, for example while parsing a multipart upload, the request data is only half initialised. The cleanup that follows treats it as valid, and an attacker who controls the request controls that memory.
CVE-2026-109619, remote code execution via stale global state. Some request-owned state survives after its memory has been freed. The next request served by the same worker can use it before normal initialisation resets it. Confirmed paths include session upload progress and INI diagnostics emitted before initialisation.
Both rate CVSS v4.0 9.2 and need no authentication. php.net says every PHP installation serving web requests is at risk, with mod_php the worst case: a demonstrated exploit fires before any application code runs. Tenable reports that PHP2Shell is now broadly exploited in the wild, and Amazon’s honeypots saw an attempt four days before disclosure.
Who is affected by PHP2Shell on CentOS 7
Every CentOS 7 or RHEL 7 server that serves PHP over the web is affected unless it already runs a patched build, whether it uses PHP-FPM, Apache mod_php or php-cgi. That includes PHP 8.2 and 8.3: upstream fixed those branches, but Remi’s CentOS 7 builds froze at 8.2.20 and 8.3.8, so yum update never delivers the fixed release.
Why CentOS 7 servers are stuck
The PHP project fixed only the supported branches: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. For 7.4, 8.0 and 8.1 it published minimal source-only backports. For PHP 7.3 and older it published nothing at all.
Most CentOS 7 servers run PHP from the Remi repository, and Remi stopped building for EL7 in June 2024. On release day php.net itself told Remi users that the repository would not have updates that day and to build from source. Hosting providers emailed customers telling them to patch their own servers.
So a CentOS 7 host on Remi PHP had three options: rebuild PHP from source with a hand-ported patch, pay a commercial extended-support vendor whose packages use different names and paths, or stay exposed.
The interim mitigations are partial
The advisory lists stopgaps: memory_limit=-1, a low post_max_size, and session.upload_progress.enabled=0. They are worth applying while you schedule the upgrade, but the PHP team is explicit that only an update is a complete solution. Removing the memory limit still leaves real allocation failures reaching the vulnerable path, and disabling upload progress blocks only the confirmed session path for CVE-2026-109619, not its other variants.
For what NGINX can block in front of PHP while you schedule the upgrade, and what it cannot, see PHP2Shell mitigation in NGINX.
The GetPageSpeed fix for each PHP version
GetPageSpeed rebuilt every Remi EL7 PHP branch with the PHP2Shell fix. Every package keeps the Remi name, ABI and library SONAMEs, so yum upgrade swaps it in place. PECL extensions and ionCube Loader keep working without a rebuild. Each version has its own page with the full list of security fixes it carries.
| PHP | Base-name channel | Patched build (both shapes) | Where the fix comes from |
|---|---|---|---|
| 5.4 | getpagespeed-extras-php54 |
5.4.45-20.el7 |
the PHP 5.6 adaptation, ported to 5.4; drop-in for stock CentOS 7 php-5.4.16 |
| 5.6 | getpagespeed-extras-php56 |
5.6.40-44.el7 |
PHP 5.6 adaptation of the upstream 7.4 fix, audited hunk by hunk, with the executor-shutdown resets other 5.6 ports omit |
| 7.0 | getpagespeed-extras-php70 |
7.0.33-46.el7 |
port of the official 7.4 fix |
| 7.1 | getpagespeed-extras-php71 |
7.1.33-35.el7 |
port of the official 7.4 fix |
| 7.2 | getpagespeed-extras-php72 |
7.2.34-30.el7 |
port of the official 7.4 fix |
| 7.3 | getpagespeed-extras-php73 |
7.3.33-26.el7 |
official 7.4 fix, hunk for hunk |
| 7.4 | getpagespeed-extras-php74 |
7.4.33-35.el7 |
official 7.4 fix, as packaged in Remi’s maintained 7.4 sources |
| 8.0 | getpagespeed-extras-php80 |
8.0.30-25.el7 |
official PHP 8.0 backport, verified line for line |
| 8.1 | getpagespeed-extras-php81 |
8.1.34-8.el7 |
official 8.1 backport, rebuilt from Remi’s maintained 8.1.34 (EL7 had frozen at 8.1.29) |
| 8.2 | getpagespeed-extras-php82 |
8.2.35-2.el7 |
upstream PHP 8.2.35 (EL7 had frozen at 8.2.20) |
| 8.3 | getpagespeed-extras-php83 |
8.3.36-2.el7 |
upstream PHP 8.3.36 (EL7 had frozen at 8.3.8) |
| 8.4 | getpagespeed-extras-php84 |
8.4.27-3.el7 |
upstream PHP 8.4.27 |
The software collection of every version (php56-php-* to php84-php-*) is in the main getpagespeed-extras repository. PHP 8.4 never had a Remi build for CentOS 7, so php84-php is GetPageSpeed’s own collection; scl enable php84 works the same as for the others.
More than PHP2Shell. Remi kept patching EOL PHP for EL8 and newer after it stopped building for EL7. The GetPageSpeed builds start from those maintained sources, so they also bring the 2024 to 2026 fixes EL7 never received. Where Remi’s sources stop before the October 2026 security batch (5.6, 7.0, 7.1, 7.2 and 7.3), GetPageSpeed ported it (mysqlnd, OpenSSL hostname checks, SOAP, phar, stream filters, FastCGI ACLs and HTTP redirects) to those branches itself.
Oracle (oci8). Every channel from 5.6 to 8.3 ships php-oci8 and phpNN-php-oci8, linked against Oracle Instant Client 21 like Remi’s builds, so an existing oci8 install upgrades cleanly. Install oracle-instantclient-basic 21.x from Oracle: GetPageSpeed does not redistribute Oracle’s libraries.
PHP 8.4 differences. No oci8 (upstream removed it from core), and zip is the bundled extension (php-zip / php84-php-zip). The 8.4 stack links maintained libraries instead of EL7’s frozen ones: OpenSSL 3.5 LTS, ICU 74, libzip 1.11, libpq 17 and libxml2 2.13.
How each build was validated. In a clean CentOS 7 container, the test harness installs the exact Remi package the build replaces and proves both PHP2Shell probes reproduce there. It then upgrades in place and proves both probes are fixed. It also checks that:
- the full phpt suite shows no regressions against the Remi baseline, apart from the tests whose behaviour the fix changes by design;
php -mlists the same modules, including PECL extensions and ionCube;- configuration files are preserved and PHP-FPM keeps serving after an out-of-memory request;
yum downgradeback to the Remi packages works.
On top of the package tests, a separate runtime test suite serves real pages through every channel, through both Apache mod_php and PHP-FPM, in four scenarios: a fresh install, an upgrade from Remi with PECL extensions and ionCube loaded, and the same two for the software collection. It runs on every change and nightly against the published repository.
The first builds went to production on October 22, the day after disclosure, on PrestaShop 1.6, Magento 1 and custom PHP 8.0 servers, with no downtime beyond a PHP-FPM restart.
Check whether your server is vulnerable
rpm -qa 'php*-common' --qf '%{NAME}-%{VERSION}-%{RELEASE}\n'
A release ending in .el7.remi is vulnerable: every Remi EL7 build predates the fix. After the upgrade you should see a GetPageSpeed release from the table above, such as php-common-7.4.33-35.el7 or php82-php-common-8.2.35-2.el7.
Only have php at hand, not rpm? Current GetPageSpeed builds print their exact release in php -v:
php -v | grep 'Built by'
Built by GetPageSpeed LLC (7.1.33-42.el7)
Compare that release with the table above, or paste the full php -v output into the PHP2Shell checker. A bare Built by GetPageSpeed LLC without a release is an older build: use the rpm command above.
Prefer a one-command check? CVEfox, the free GetPageSpeed scanner, reads every installed PHP package, knows each vendor’s backports and prints the exact fix:
yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum -y install cvefox
cvefox scan
Rollback and caveats
yum downgrade returns you to the Remi packages if you ever need to. For PHP 8.0 (either shape) the target is Remi’s 8.0.30-6, because the older 8.0.30-3 is no longer on Remi’s mirrors. PHP 8.4 has no Remi build to return to; its rollback is your previous PHP version.
One behaviour changes in the backported branches (5.6 to 8.1). A request that hits memory_limit now ends its worker immediately: shutdown functions do not run and buffered output is not sent. This is the same trade the PHP security team made in its own EOL backports, because the unsafe unwinding is exactly what PHP2Shell abuses. Code that relied on catching memory exhaustion in a shutdown handler will need attention.
Finally, CentOS 7 itself is still end-of-life. These channels keep the PHP layer patched; they do not make the operating system supported. Everpatch for CentOS 7 covers the rest of what GetPageSpeed maintains for EL7, including a current LTS kernel. Plan the migration, but don’t run exposed in the meantime.
FAQ
Is PHP 7.4 on CentOS 7 affected by CVE-2026-109618?
Yes. PHP2Shell affects every branch from 5.4 onwards, and Remi’s last EL7 build of PHP 7.4 predates the fix. For Remi’s php74 software collection (php74-php-* packages), install the GetPageSpeed release package and run yum upgrade 'php74-php*'. For a base-name install (php-7.4.33-15.el7.remi from remi-php74) run yum --enablerepo=getpagespeed-extras-php74 upgrade 'php-*' instead.
Is there a PHP 5.6 security patch for CentOS 7?
Yes. The getpagespeed-extras-php56 channel ships php-5.6.40-44.el7 with the PHP2Shell fix and the later security fixes Remi only published for EL8, as a drop-in replacement for the Remi remi-php56 packages. The php56-php collection gets the same build from the main repository.
What about PHP 7.1 and 7.2?
Both are covered since October 24: getpagespeed-extras-php71 (7.1.33-35.el7) and getpagespeed-extras-php72 (7.2.34-30.el7), in both shapes, with the same install commands as every other version.
Do I need a GetPageSpeed subscription for the PHP2Shell fix?
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: it funds these backports and keeps your servers covered for the next EOL PHP CVE. Administering servers for clients, or more than 10? GetPageSpeed Fleet starts at $800/year.
Will my PECL extensions and ionCube Loader still work?
Yes. The fix changes no structure layout or API number, and validation confirms the loaded module list is identical before and after the upgrade.
Is setting session.upload_progress.enabled=0 enough?
No. It blocks one confirmed path for CVE-2026-109619 and does nothing for CVE-2026-109618. The PHP security team says only an update is a complete fix.
Conclusion
PHP2Shell on CentOS 7 is a critical, unauthenticated remote code execution, and servers on Remi PHP have no upstream or distribution fix. The GetPageSpeed channels close that gap for every PHP from 5.4 to 8.4, in place, validated, and free to install.
Running these servers for a business? Commercial production use requires GetPageSpeed Ultra ($500/year, up to 10 servers). Every new PHP CVE has to be ported again to branches upstream abandoned years ago; Ultra funds that work and keeps up to 10 servers patched for the next one, together with the full GetPageSpeed repository of NGINX builds and modules for CentOS 7.
Patching PHP is only half of a CentOS 7 server. The NGINX in front of it drifts too, one config change at a time. GetPageSpeed Amplify runs scheduled gixy scans across every host and ties findings to live NGINX runtime metrics. Drop-in compatible with the deprecated nginx-amplify-agent (EOL January 2026).
