Skip to main content

PHP 5.4 Security Patches for CentOS 7

Everpatch PHP keeps the PHP 5.4 that CentOS 7 shipped by default security-patched — a drop-in upgrade for the stock php-5.4.16 packages.

Signed RPM rebuilds of PHP 5.4.45 with current security fixes hand-ported to the 5.4 codebase. Same package names, same extension ABI and the same /etc/php.d layout as stock CentOS 7, so yum upgrade replaces them in place.

PHP2Shell fixed from 5.4.45-20.el7 (php-*) and 5.4.45-20.el7 (php54-php-*). How to apply it · Check your server · Scan it with CVEfox

Ultra, $500/year Fleet, from $800/year

The gap

PHP 5.4 was the default PHP of CentOS 7, and many servers still run the stock php-5.4.16 packages. Upstream PHP 5.4 ended in 2015, CentOS 7 went end of life in June 2024, and Remi's last 5.4 build is from 2022, so every PHP security release since then left 5.4 on CentOS 7 exposed.

Everpatch PHP 5.4 ports current security fixes to the 5.4 engine, audited against upstream and against this project's 5.6 ports. Extensions built for stock CentOS 7 PHP and the ionCube 5.4 loader keep loading, because the PHP API and Zend extension ABI are unchanged.

Install

Upgrading stock CentOS 7 PHP 5.4 in place (base-name php-*)

yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum upgrade php 'php-*'
systemctl restart php-fpm   # or: systemctl restart httpd
php -v

Side by side (software collection, php54-php-*)

yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum install php54-php-cli php54-php-fpm
systemctl restart php54-php-fpm
scl enable php54 -- php -v

The base-name packages are in the always-enabled main repository, so a plain yum update keeps stock PHP 5.4 patched. To hold PHP back, add exclude=php* to the getpagespeed-extras repository. Hosts that already enabled getpagespeed-extras-php54 get the same packages from it. On a fresh host, swap upgrade 'php-*' for install php-cli php-fpm plus the extensions you need.

Hosts on Remi's remi-php54 or its php54-php-* collection upgrade in place the same way; the collection lives in the always-enabled main repository.

PHP 5.4 has no Oracle oci8 build in this channel, matching stock CentOS 7.

Free for personal use. Running it for a business?

Patching EOL PHP is ongoing work: every new PHP CVE has to be ported to branches upstream abandoned years ago, then built and tested on EL7. Commercial production use requires GetPageSpeed Ultra or GetPageSpeed Fleet: either one funds that work and keeps your production servers covered for the next one, together with the full GetPageSpeed repository. When a new fix is ready for the PHP your servers run, we email you the exact command. Ultra covers up to 10 servers running your own services; Fleet is the plan for servers that host client websites, or for more than 10 servers. 250+ employees or $10M+ revenue, or need a contractual SLA and invoice/PO? That is Enterprise.

Ultra, $500/year Fleet, from $800/year Contact us about Enterprise

Security fixes in this channel

The channel's security notes track 104 CVE fixes and 10 further GitHub security advisories that never reached the last vendor build for Enterprise Linux 7.

Fixed in Everpatch PHP 5.4
CVE-2016-4473, CVE-2016-7124, CVE-2016-7125, CVE-2016-7126, CVE-2016-7127, CVE-2016-7129, CVE-2016-7130, CVE-2016-7131, CVE-2016-7132, CVE-2016-7411, CVE-2016-7412, CVE-2016-7413, CVE-2016-7416, CVE-2016-7417, CVE-2016-7418, CVE-2016-8670, CVE-2016-9933, CVE-2016-9934, CVE-2016-9935, CVE-2016-10161, CVE-2017-9224, CVE-2017-9226, CVE-2017-9227, CVE-2017-9228, CVE-2017-9229, CVE-2017-11143, CVE-2017-11144, CVE-2017-11145, CVE-2017-11628, CVE-2017-12933, CVE-2017-16642, CVE-2018-5712, CVE-2018-10545, CVE-2018-10546, CVE-2018-10547, CVE-2018-10548, CVE-2018-10549, CVE-2018-14851, CVE-2018-14883, CVE-2018-20783, CVE-2019-6977, CVE-2019-9021, CVE-2019-9023, CVE-2019-9637, CVE-2019-9638, CVE-2019-9640, CVE-2019-11034, CVE-2019-11035, CVE-2019-11036, CVE-2019-11039, CVE-2019-11040, CVE-2019-11041, CVE-2019-11042, CVE-2019-11044, CVE-2019-11045, CVE-2019-11046, CVE-2019-11047, CVE-2019-11048, CVE-2019-11050, CVE-2019-13224, CVE-2020-7059, CVE-2020-7060, CVE-2020-7062, CVE-2020-7063, CVE-2020-7064, CVE-2020-7066, CVE-2020-7067, CVE-2020-7068, CVE-2020-7070, CVE-2020-7071, CVE-2021-21702, CVE-2021-21703, CVE-2021-21704, CVE-2021-21705, CVE-2021-21707, CVE-2022-31625, CVE-2022-31628, CVE-2022-31629, CVE-2022-31631, CVE-2023-0567, CVE-2023-0568, CVE-2023-0662, CVE-2023-3247, CVE-2023-3823, CVE-2023-3824, CVE-2024-2756, CVE-2024-5458, CVE-2024-8925, CVE-2024-8926, CVE-2024-8927, CVE-2024-8929, CVE-2024-11233, CVE-2024-11234, CVE-2025-1218, CVE-2025-14181, CVE-2026-6103, CVE-2026-6735, CVE-2026-7261, CVE-2026-7262, CVE-2026-91765, CVE-2026-91766, CVE-2026-92842, CVE-2026-109618, CVE-2026-109619
GHSA-4w77-75f9-2c8w, GHSA-6wmf-4rv5-p3rp, GHSA-88hq-2827-7pg6, GHSA-ch8v-r6jh-4vvr, GHSA-cj93-vc83-wgqv, GHSA-fpwc-w8rq-cr92, GHSA-j3wh-g957-2m85, GHSA-r6x9-5r99-36j7, GHSA-rgrp-mwpx-f6rm, GHSA-w8hw-w9fx-j79w

Fixes are ports of the upstream php-src security patches, audited hunk by hunk; the provenance of every patch is documented per release. The background story of patching EOL PHP on CentOS 7 is covered in our PHP2Shell write-up.

Frequently asked questions

Is PHP 5.4 on CentOS 7 patched for PHP2Shell?

Yes. Everpatch PHP 5.4 carries the backported PHP2Shell fix from 5.4.45-20.el7 (php-*) and 5.4.45-20.el7 (php54-php-*) onward. The PHP version number does not change, so check the package release rather than php -v, or paste your package list into the PHP2Shell checker. The full walkthrough is in our PHP2Shell guide.

Does it work with the stock CentOS 7 PHP packages?

Yes, that is what it is built for. It ships the same package names as stock CentOS 7 PHP (php, php-cli, php-common, php-mysqlnd, php-gd, ...) with the same extension ABI and configuration paths. After installing the release package, a plain yum update replaces php-5.4.16 with the patched 5.4.45 build; your php.ini and php.d edits are kept.

Will my extensions and ionCube keep working?

Extensions built for stock CentOS 7 PHP 5.4 load unchanged, and so does the ionCube Loader for PHP 5.4: every PHP 5.4 release shares one extension ABI. Moving from 5.4.16 to 5.4.45 brings only upstream bug and security fixes within the 5.4 branch, no language changes.

Is PHP 5.4 still safe to run on CentOS 7?

Safer with this channel than without it: the publicly known PHP vulnerabilities that apply to 5.4 are being patched here, years after upstream stopped. PHP 5.4 remains an end-of-life runtime — plan your upgrade on your own schedule. Everpatch exists so a CVE disclosure does not set that schedule for you.

What if I would rather move to a current PHP?

The GetPageSpeed PHP 8.4 stack runs current, upstream-supported PHP on CentOS 7. For a 5.4-era codebase that is usually a porting project — until it happens, this channel keeps the known holes closed.

Do I need a subscription?

Not for personal, development or evaluation use: the PHP packages install from the public GetPageSpeed repository with no signup. Commercial production use requires a subscription under the repository terms: GetPageSpeed Ultra ($500/year) for up to 10 servers running your own services, or GetPageSpeed Fleet (from $800/year) for servers that host client websites or fleets larger than 10. Either one funds these backports and keeps your servers covered for the next EOL PHP CVE. Organizations with 250+ employees or $10M+ revenue, or anyone needing a contractual SLA and invoice/PO procurement, should contact us about Enterprise. To license servers without registering IP addresses, place your license file at /etc/getpagespeed/license.jwt.