Red Hat Enterprise Linux, AlmaLinux and Rocky Linux 8, 9 and 10
How to update PHP on RHEL, AlmaLinux and Rocky Linux
On RHEL and its rebuilds, PHP2Shell is fixed one PHP stream at a time. Red Hat shipped errata for RHEL 8, 9 and 10 from 21 October 2026, and AlmaLinux and Rocky Linux published matching advisories by 23 October. Update with dnf, restart php-fpm rather than reloading it, and rebuild any containers.
Last reviewed against Red Hat, AlmaLinux, Rocky Linux, Remi's repository and php.net.
Red Hat's position
From bulletin to errata
Red Hat tracks PHP2Shell in security bulletin RHSB-2026-013, first published on 21 October 2026. It covers RHEL 10, 9 and 8, plus RHEL 7, which is affected by CVE-2026-109619 only. Red Hat rates the issue Important, with a CVSS 3.1 score of 8.1, while the PHP project calls it Critical at CVSS v4.0 9.2. Scores from different bodies vary; none of them makes the update optional.
Status at 23 October 2026
The bulletin was last updated on 23 October 2026. At that point it said some updates were already available, with more still in progress.
Status at 27 October 2026
Red Hat's CVE data lists the errata below for RHEL 8, 9 and 10. It also lists a php:8.4 stream on RHEL 9 as affected, with no erratum yet.
| Release | PHP package or stream | Fixed in | Advisory (RHSA, ALSA, RLSA) |
|---|---|---|---|
| RHEL 10 | php (PHP 8.3) | 8.3.36-1.el10_2 | 2026:87070 |
| RHEL 10 | php8.4 (PHP 8.4) | 8.4.27-1.el10_2 | 2026:87071 |
| RHEL 9 | php (PHP 8.0) | 8.0.30-8.el9_8.1 | 2026:87151 |
| RHEL 9 | php:8.2 stream | 8.2.35-1.module… | 2026:87072 |
| RHEL 9 | php:8.3 stream | 8.3.36-1.module… | 2026:87079 |
| RHEL 8 | php:7.4 stream | 7.4.33-8.module… | 2026:87080 |
| RHEL 8 | php:8.2 stream | 8.2.35-1.module… | 2026:87073 |
- Red Hat issued all seven on 21 October 2026, and both CVEs are fixed by the same build on each row. AlmaLinux (ALSA) and Rocky Linux (RLSA) use the same advisory numbers.
-
Module builds carry a long tag after
modulethat differs between the three: Red Hat's RHEL 8 php:8.2 build is8.2.35-1.module+el8.10.0+25110+f67151d2, AlmaLinux's is8.2.35-1.module_el8.10.0+4323+fc907035. Compare the version and the first release number, not the tag. - Extended update channels (EUS, AUS, TUS, SAP and RHEL 7's Extended Life Cycle Support) received separate errata on 23 October 2026, for example RHSA-2026:88693 for RHEL 7 ELS.
Primary sources: RHSB-2026-013, Red Hat CVE-2026-109618, Red Hat CVE-2026-109619, AlmaLinux errata and Rocky Linux errata. For the PHP project's own fixed releases, which Remi's builds follow, see PHP2Shell explained.
Five dnf steps
Update PHP with dnf in five steps
The same commands work on RHEL, AlmaLinux and Rocky Linux. Where an advisory ID appears, use the ALSA or RLSA prefix on the rebuilds.
-
Work out which PHP you run
# RHEL 8 and 9: which php stream is enabled [e] and installed [i] dnf module list php # Any release: the PHP packages on the system dnf list --installed 'php*'The module list marks streams
[d]for default,[e]for enabled,[x]for disabled and[i]for installed. No stream enabled on RHEL 9 means the plain PHP 8.0 package. RHEL 10 has no streams, so look forphp8.4in the package names instead. -
Find the advisory for your stream
sudo dnf updateinfo list updates security sudo dnf updateinfo info --cve CVE-2026-109618The first command lists security advisories with packages ready to install; the second shows the advisory that fixes a given CVE. If nothing PHP-related appears, your stream may be retired: see changing stream.
-
Install the update
# Every pending security fix sudo dnf update --security # Or only the PHP advisory (RHEL 9, php:8.3 stream in this example) sudo dnf update --advisory=RHSA-2026:87079AlmaLinux's own PHP2Shell announcement used a broader form that refreshes the repository metadata first and then upgrades every PHP package:
sudo dnf clean metadata && sudo dnf upgrade 'php*' -
Confirm the fix is installed
rpm -q php-fpm rpm -q --changelog php-fpm | grep -E 'CVE-2026-10961(8|9)' dnf updateinfo list --cve CVE-2026-109619 --installedThe RHEL 9 changelog entry for PHP 8.0.30-8.1, for example, lists "Avoid state corruption via bailout" against both CVE IDs. Rocky Linux's guidance puts it plainly: if the changelog search prints nothing, the installed package does not have the fix. On RHEL 10 with PHP 8.4, query
php8.4-fpminstead. -
Restart PHP-FPM, not reload it
sudo systemctl restart php-fpm sudo systemctl restart httpd # only if Apache loads PHP as mod_php sudo dnf needs-restarting # processes still using replaced filesPHP-FPM has been the default way to run PHP since RHEL 8, and Red Hat's bulletin is explicit that a reload will not do, because existing workers can hold on to state from earlier requests.
dnf needs-restartinglists processes rather than services, so read its output as a to-do list. More on worker restarts in the PHP-FPM guide.
How each release packages PHP
RHEL 8, 9 and 10 do PHP differently
Life cycle dates are from Red Hat's Application Streams policy.
A retired stream gets no updates or errata from Red Hat, which is
the main reason a server can stay vulnerable after
dnf update.
RHEL 8: module streams
PHP comes as streams of the php module. php:7.4 is supported for the life of RHEL 8 and php:8.2 until May 2029; php:7.2, 7.3 and 8.0 are retired. The default common profile also installs php-fpm, which Apache uses to run PHP.
RHEL 9: plain package plus streams
The php package itself is PHP 8.0. php:8.2 and php:8.3 run to May 2029, while php:8.1 retired in May 2025. Apache runs PHP through PHP-FPM by default here too.
RHEL 10: versioned packages
Red Hat ships no modular content in RHEL 10. The php package is PHP 8.3, supported for the life of the release, and PHP 8.4 arrived in RHEL 10.2 as php8.4, supported until May 2029.
Remi's repository
Remi Collet's builds of the PHP project's releases for Enterprise Linux 8, 9 and 10 and Fedora. On 22 October 2026 it published 8.2.35, 8.3.36, 8.4.27 and 8.5.12, so php.net's version numbers apply directly.
AlmaLinux
Chose not to wait for RHEL: it began shipping its own patched packages for every PHP stream on 21 October 2026, then published ALSA advisories carrying Red Hat's numbers on 22 October. It also patched streams Red Hat has retired.
AlmaLinux errata
Rocky Linux
Rebuilt Red Hat's updates and published RLSA advisories for all seven errata in the table on 22 October 2026. Rocky's documentation notes that an RLSA shares its number with the matching RHSA.
Rocky Linux errataRetired streams and branch changes
When your PHP stream gets no fix
Servers still on php:7.2, 7.3 or 8.0 on RHEL 8, or php:8.1 on RHEL 9, have no Red Hat erratum to install. AlmaLinux patched those streams anyway on 23 October 2026 (ALSA-2026:A011 to A014), but warns that it cannot promise the same next time. The durable fix is a supported stream.
RHEL 8 and 9: switch stream
# RHEL 8 or 9: move to a newer, supported stream
sudo dnf module switch-to php:8.3
# Return the php module to its initial state if a switch gets tangled
sudo dnf module reset php switch-to replaces every
package from the old stream with the new stream's versions, and Red
Hat's own example uses it to move RHEL 9 from the plain PHP 8.0
package to a stream. Red Hat asks you to back up your data and
follow the component's migration notes first. A reset clears the
enabled stream without removing installed packages. On RHEL 8 the
newest stream is php:8.2.
RHEL 10: swap packages
dnf list --installed 'php*'
sudo dnf remove 'php*'
sudo dnf install php8.4-common php8.4-cli php8.4-fpm
Red Hat's RHEL 10 guide moves to PHP 8.4 by removing the existing
PHP packages and installing the php8.4 ones with the extensions you
need, so note the list from the first command before removing
anything. The guide also warns that dnf's
--allowerasing option can
take PHP extensions with it unexpectedly.
A branch change is a project, not a patch. If it cannot happen before the server is exposed again, decide whether the site should stay online, and check the PHP end of life dates for the branch you are moving to.
Remi's repository
Updating PHP from Remi on Enterprise Linux
Remi Collet's repository packages newer PHP branches for RHEL,
AlmaLinux, Rocky Linux and CentOS Stream. Its 22 October
2026 release post marks the four fixed versions as strongly
recommended because they close CVE-2026-109618 and CVE-2026-109619.
On a server already using Remi, a normal
dnf update picks them up.
A single PHP version (EL 9, PHP 8.3)
These are the commands Remi's configuration wizard gives. On EL 8 the extra repository is called powertools rather than crb, and the release packages end in 8 rather than 9.
sudo dnf config-manager --set-enabled crb
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
sudo dnf module switch-to php:remi-8.3
php --version
Remi's packages keep the distribution's names (php-*)
and replace its builds. Per the wizard,
switch-to also upgrades or downgrades
a version that is already installed.
Several versions side by side
Remi also packages each branch as a Software Collection in the
remi-safe repository, with names such as
php84. Each collection has its own
PHP-FPM service, which is restarted separately:
sudo dnf install php84 php84-php-fpm
sudo systemctl restart php84-php-fpm Older branches need checking
The wizard still offers PHP 8.1.34, 8.0.30 and 7.4.33, labelled
as having no upstream support, and the repository still carries
builds of them. Remi's 22 October post only covers the four
supported branches, so before trusting an old-branch build run
rpm -q --changelog on
it and look for the two CVE IDs.
Containers
RHEL and UBI based images
Running dnf update
inside a live container is not the fix. Red Hat's bulletin asks
for the running container or pod to be replaced, and for your
own images to be rebuilt once the base images are updated.
The bulletin also points to the Container Health Index in Red Hat's container catalogue for checking image status, and lists products built on RHEL, such as OpenShift Container Platform and OpenStack Platform, as in scope. For the build and redeploy steps, see updating PHP in Docker.
Where mod_php still turns up
- RHEL 7. Red Hat's bulletin names mod_php as the default there, so restart httpd after the ELS update.
- AlmaLinux 8. AlmaLinux's announcement says it ships mod_php, which loads only under Apache's prefork MPM.
- AlmaLinux 9 and 10. The same announcement says neither ships mod_php.
- Why it matters. mod_php is where the PHP project confirmed remote code execution, and php.net advises against it for new installations. More in PHP on Apache.
Confirm it worked
Sign-off checks for a RHEL family server
- 1. The installed build matches the erratum.
rpm -q php-fpmshows the version and release from the table, or a later one. - 2. dnf agrees the CVE is covered.
dnf updateinfo list --cve CVE-2026-109619 --installednames the installed advisory. - 3. Every PHP-FPM service was restarted.
Including any Remi collections, such as
php84-php-fpm.systemctl statusshows when each last started. - 4. The website reports the patched build. A site can be served by a different PHP from the one the shell runs: check the PHP version your site uses.
Both CVEs joined CISA's Known Exploited Vulnerabilities catalogue on 26 October 2026, so any RHEL family server reachable from the internet before its update needs checking for backdoors: has your PHP site been compromised?
Troubleshooting
When dnf will not give you a fixed PHP
"Nothing to do", but the table says you are behind
Check the enabled stream first: a retired stream has no
erratum to install. If the stream is supported, clear stale
metadata with sudo dnf clean metadata
and try again. Rocky's documentation adds that a missing RLSA
does not always mean a missing fix, so read the changelog too.
RHEL 9 with the php:8.4 stream
On 27 October 2026 Red Hat listed this stream as affected with no erratum. Until one appears, apply the interim settings, or take PHP 8.4.27 from Remi's repository, which published it on 22 October 2026.
A scan still reports PHP 8.0.30 or 7.4.33 as vulnerable
Red Hat backports fixes, and its backporting page warns that the version number alone cannot show whether a package is vulnerable. Keep the changelog output from step 4 with the scan result.
The site still runs the old PHP, or php-fpm will not start
List every PHP unit to find a second FPM service, read the
journal for start-up errors, and test the configuration. Pool
files are in /etc/php-fpm.d/.
systemctl list-units 'php*'
journalctl -u php-fpm -e
sudo php-fpm -t Debian and Ubuntu servers use apt and different version rules: updating PHP on Debian and updating PHP on Ubuntu. The Linux overview explains backported versions, and the main update guide covers everything else.
Quick answers
RHEL, AlmaLinux and Rocky: PHP questions
Are AlmaLinux and Rocky Linux fixed at the same time as RHEL?
Within a day or so. Rocky Linux published advisories matching all seven of Red Hat's 21 October errata on 22 October 2026. AlmaLinux's technical steering committee decided not to wait for a RHEL update and began shipping patched packages on 21 October; its ALSA advisories with Red Hat's numbers followed on 22 October.
Which PHP version does RHEL 9 install by default?
PHP 8.0, from the plain php package. The PHP project ended PHP 8.0 support on 26 November 2023, yet Red Hat fixed PHP2Shell in its own build, 8.0.30-8.el9_8.1 (RHSA-2026:87151). The version still reads 8.0.30 because the fix was backported, which is why the changelog is the better test.
Is the php:8.1 stream on RHEL 9 still patched?
Not by Red Hat. php:8.1 retired in May 2025, and Red Hat's life cycle policy says retired Application Streams receive no updates or errata, so there is no RHSA for it. AlmaLinux issued its own fix (ALSA-2026:A014) but says future fixes for retired streams are not guaranteed. Moving to php:8.2 or php:8.3 is the safer course.
Does RHEL 10 use dnf module streams for PHP?
Not for Red Hat's own packages. Red Hat states that no modular content ships with RHEL 10; PHP 8.3 is the php package and PHP 8.4 is a separate php8.4 package. Remi's repository is the exception: its wizard still sets up PHP on EL 10 with dnf module switch-to php:remi-8.4.
Why restart php-fpm instead of reloading it?
Because a reload can leave old workers running. Red Hat's bulletin RHSB-2026-013 says a reload is not enough, since existing workers may keep affected state from earlier requests, and asks for every worker to be restarted after any change. That applies both to the package update and to the interim configuration settings.
Know your exposure
Find every PHP server you run
Patching the server you know about is the easy part. A vulnerability scan finds the forgotten staging site, the old microsite and the appliance with PHP inside, then tells you which ones are still exposed.