How to patch PHP for CVE-2026-109618 in rConfig
How to patch PHP for CVE-2026-109618 and CVE-2026-109619
Section titled “How to patch PHP for CVE-2026-109618 and CVE-2026-109619”This page gives example steps for updating PHP on the server that hosts rConfig to a release that fixes CVE-2026-109618 and CVE-2026-109619 (known as PHP2Shell). It covers the rConfig Docker image, Ubuntu, CentOS / Rocky Linux and RHEL, and accompanies the rConfig Security Advisory rCFG-SA-2026-01.
When to use this
Section titled “When to use this”Use this page as a reference when you and your systems team update PHP on a server running rConfig Pro, Vector or Core. The PHP project says all PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, with the highest risk for mod_php. The rConfig Docker image runs PHP as an Apache module (mod_php).
Prerequisites
Section titled “Prerequisites”- Root or sudo access to the rConfig server, or to the Docker host
- A current backup of the rConfig application directory and database. See backing up rConfig before an update
- A maintenance window agreed with your team. Apache, PHP-FPM and the Horizon queue workers restart during the update
- Your rConfig version, so you can match it to the PHP version it runs on in the advisory’s rConfig Pro and Core tables
Which PHP version fixes the vulnerabilities?
Section titled “Which PHP version fixes the vulnerabilities?”The PHP project released the fixed versions on 21 October 2026. Update to the fixed release for the PHP version you already run.
| Your PHP version | First fixed release | Notes from the advisory |
|---|---|---|
| 8.5.x | 8.5.12 | Replaces 8.5.11 |
| 8.4.x | 8.4.27 | Replaces 8.4.26 |
| 8.3.x | 8.3.36 | Replaces 8.3.35 |
| 8.2.x | 8.2.35 | Replaces 8.2.34. PHP 8.2 reaches end of life on 31 December 2026 |
| 8.1 or older | No update from the PHP project | Use a vendor backport, build from source with the PHP security team’s backport, or upgrade to a supported PHP version. Restrict access and contact prosupport@rconfig.com before changing PHP |
Linux distributions and LTS vendors received the patches in advance, so check your vendor for updated packages. Third-party repositories can take longer. The advisory’s Availability of fixed PHP packages table shows the latest known status for Remi, ppa:ondrej/php and the rConfig Docker image.
Example steps: patch PHP
Section titled “Example steps: patch PHP”1. Restrict access to rConfig
Section titled “1. Restrict access to rConfig”If you have not already, restrict access to rConfig, ideally to a VPN or trusted management IP addresses. Do not expose the web interface directly to the internet. Keep the restriction in place until PHP is updated.
For firewall examples, see rConfig security hardening.
2. Check your current PHP version and how PHP is served
Section titled “2. Check your current PHP version and how PHP is served”-
Check the PHP CLI version:
Terminal window php -v -
Check whether Apache runs PHP as a module (mod_php):
Terminal window # Ubuntuapache2ctl -M 2>/dev/null | grep -i php# CentOS / Rocky / RHELhttpd -M 2>/dev/null | grep -i phpA line such as
php_module (shared)means mod_php. -
Check whether PHP-FPM is running:
Terminal window systemctl list-units --type=service | grep -i fpm
Note the results. They tell you which services to restart and, if needed, which workaround applies.
3. Update PHP
Section titled “3. Update PHP”rConfig V8 Pro Docker image
The rConfig image is built on the official php:8.4-apache-bookworm image. That base image was updated on Docker Hub on 21 October 2026, but the rConfig image has to be rebuilt on it. PHP in the image is compiled from source, so it cannot be patched with apt inside the container.
-
Check the advisory or contact prosupport@rconfig.com to confirm the updated rConfig image is available. Until it is, see what to do if the fix is not available yet.
-
Record the PHP version the container runs today, so you can compare it after the update:
Terminal window docker exec rconfig8docker-app-1 php -r 'echo PHP_VERSION, PHP_EOL;' -
Back up the data directory from the root of your
rconfig8dockerclone:Terminal window tar -czf rconfig-data-backup-$(date +%Y%m%d).tar.gz ./data -
Pull the updated image:
Terminal window docker compose pullCheck the output for the app image.
PulledorDownloaded newer imagemeans a new image arrived.Image is up to datemeans nothing changed, so the updated image is not on your tag yet. Stop here and contact prosupport@rconfig.com. -
Recreate the container so it runs the new image:
Terminal window docker compose up -d --force-recreate -
Confirm the PHP version inside the container is now
8.4.27or later:Terminal window docker exec rconfig8docker-app-1 php -r 'echo PHP_VERSION, PHP_EOL;'If it still shows the version you recorded in step 2, the container is not running the updated image. Do not treat the server as patched. Keep access restricted, apply the interim measures
-
Confirm all services are running:
Terminal window docker exec rconfig8docker-app-1 supervisorctl status
Ubuntu 20.04 / 22.04 / 24.04
rConfig’s Ubuntu scripts install PHP from ppa:ondrej/php. At the time of the advisory, fixed builds for Ubuntu 22.04 and 24.04 began appearing on the evening of 21 October 2026, and some architectures (arm64, for example) were still being published on 22 October. Check that your Ubuntu release and architecture show the fixed version before relying on it.
-
Store your PHP minor version in a variable:
Terminal window PHPV=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')echo $PHPV -
Refresh the package lists:
Terminal window sudo apt-get update -
Check that the candidate version is the fixed release (for example
8.4.27):Terminal window apt-cache policy php${PHPV}-cliIf the Candidate line still shows the old version, the fixed build is not yet published for your release or architecture. See what to do if the fix is not available yet.
-
Upgrade the installed PHP packages for that version:
Terminal window sudo apt-get install --only-upgrade "php${PHPV}*" "libapache2-mod-php${PHPV}"Packages that are not installed are skipped.
-
Restart PHP-FPM (if you use it) and Apache:
Terminal window sudo systemctl restart php${PHPV}-fpm 2>/dev/nullsudo systemctl restart apache2 -
Restart the Horizon queue workers so they load the new PHP binary:
Terminal window cd /var/www/html/rconfig8/current && sudo php artisan horizon:terminateSupervisor starts Horizon again automatically.
CentOS Stream / Rocky Linux / AlmaLinux 8 and 9
rConfig’s RHEL-family scripts install PHP from the Remi repository module stream (for example php:remi-8.4). At the time of the advisory, fixed Remi packages were not yet confirmed. The PHP project said the repository would not have updates on 21 October 2026.
-
Check which PHP module stream is enabled:
Terminal window sudo dnf module list --enabled php -
Refresh metadata and list the available PHP updates:
Terminal window sudo dnf clean metadatasudo dnf --refresh list --upgrades 'php*'If no update to the fixed release (for example
8.4.27) is listed, the build is not yet published. See what to do if the fix is not available yet. -
Upgrade the PHP packages:
Terminal window sudo dnf upgrade 'php*' -
Restart PHP-FPM and Apache:
Terminal window sudo systemctl restart php-fpm httpd -
Restart the Horizon queue workers so they load the new PHP binary:
Terminal window cd /var/www/html/rconfig8/current && sudo php artisan horizon:terminateSupervisor starts Horizon again automatically.
Red Hat Enterprise Linux 8 and 9
A RHEL server gets PHP either from the Remi repository (installed by rConfig’s scripts) or from Red Hat’s own AppStream PHP module. Red Hat, as an OS vendor, received the patches in advance and publishes fixes as errata. Confirm availability for your RHEL release with Red Hat or your systems team. Make sure the subscription is active before you start:
sudo subscription-manager status-
Check where PHP comes from:
Terminal window dnf info --installed php-cli | grep -E "Version|Release|From repo"A repository name containing
remimeans Remi. Anything else (for examplerhel-9-for-x86_64-appstream-rpms) means Red Hat AppStream. -
If PHP comes from Red Hat AppStream, check for the errata and apply them:
Terminal window sudo dnf updateinfo list --cve CVE-2026-109618 --cve CVE-2026-109619sudo dnf upgrade --cve CVE-2026-109618 --cve CVE-2026-109619 -
If PHP comes from Remi, refresh metadata and upgrade the PHP packages:
Terminal window sudo dnf clean metadatasudo dnf --refresh list --upgrades 'php*'sudo dnf upgrade 'php*'If no update to the fixed release is listed, see what to do if the fix is not available yet.
-
Restart PHP-FPM and Apache:
Terminal window sudo systemctl restart php-fpm httpd -
Restart the Horizon queue workers so they load the new PHP binary:
Terminal window cd /var/www/html/rconfig8/current && sudo php artisan horizon:terminate
4. Check the update
Section titled “4. Check the update”- Run
php -v(ordocker exec rconfig8docker-app-1 php -vfor Docker) and confirm the version is a fixed release. Compare it with the version you noted in step 2: if it has not changed, PHP was not updated. For vendor backports, where the version number stays the same, confirm the package changelog lists both CVE IDs instead. - Log in to rConfig and open Settings → System & Health.
- Check the PHP version in the System Info card. This is the PHP that Apache serves, which can differ from the CLI if a service was not restarted.
- Run a device backup and open a few pages to confirm rConfig works normally.
What if the fixed PHP package is not available yet?
Section titled “What if the fixed PHP package is not available yet?”Updating PHP is the only complete solution. The measures in the advisory reduce exposure to specific attack paths but do not make an installation safe. Keep access restricted while you wait for the fixed package.
From the advisory:
- CVE-2026-109618 (OOM corruption): set
memory_limit=-1in a way applications cannot override (for examplephp_admin_valuein the FPM pool or Apache configuration) and check that nothing puts a finite limit back. Set a lowpost_max_size(8Mif you do not need file uploads,32Mif you do) and keepupload_max_filesizebelow it. Use a container or cgroup limit as an availability boundary. Do not useRLIMIT_ASorRLIMIT_DATA. - CVE-2026-109619 (stale global state): set
session.upload_progress.enabled=0and restart every PHP worker, usingphp.ini, an FPM pool or server configuration that applies before request parsing. On PHP 8.5, also setfatal_error_backtraces=0.
The examples below show one way to apply these settings on a standard rConfig install. The values are examples. Agree them with your systems team.
-
Create the configuration file. On a Docker host, run these commands inside the container after
docker exec -it rconfig8docker-app-1 bash.Terminal window cat > /etc/apache2/conf-available/zz-php-cve-2026-10.conf <<'EOF'<IfModule php_module>php_admin_value memory_limit -1php_admin_value post_max_size 32Mphp_admin_value upload_max_filesize 16Mphp_admin_flag session.upload_progress.enabled off</IfModule>EOF -
Enable it:
Terminal window a2enconf zz-php-cve-2026-10 -
Restart Apache. On Ubuntu:
Terminal window sudo systemctl restart apache2Inside the Docker container:
Terminal window supervisorctl restart apache2 -
On a Docker host, set a container memory limit as an availability boundary. Size it for your server, for example:
Terminal window docker update --memory 4g --memory-swap 4g rconfig8docker-app-1
-
Open the PHP-FPM pool file:
- CentOS / Rocky / RHEL:
/etc/php-fpm.d/www.conf - Ubuntu:
/etc/php/<version>/fpm/pool.d/www.conf
- CentOS / Rocky / RHEL:
-
Add these lines at the end of the
[www]pool:php_admin_value[memory_limit] = -1php_admin_value[post_max_size] = 32Mphp_admin_value[upload_max_filesize] = 16Mphp_admin_flag[session.upload_progress.enabled] = off -
Test the configuration:
Terminal window # CentOS / Rocky / RHELsudo php-fpm -t# Ubuntusudo php-fpm${PHPV} -t -
Restart PHP-FPM so every worker picks up the change:
Terminal window # CentOS / Rocky / RHELsudo systemctl restart php-fpm# Ubuntusudo systemctl restart php${PHPV}-fpm -
Set a cgroup memory limit on the service as an availability boundary. Size it for your server, for example:
Terminal window sudo systemctl set-property php-fpm.service MemoryMax=4GOn Ubuntu, use
php${PHPV}-fpm.service.
On PHP 8.5 only, also add php_admin_flag fatal_error_backtraces off (Apache) or php_admin_flag[fatal_error_backtraces] = off (PHP-FPM).
Once PHP is patched, review these settings with your systems team. memory_limit=-1 removes PHP’s per-request memory cap, so you may want to return it to your previous value.
After patching
Section titled “After patching”If your rConfig server was reachable from the public internet, rotate all secrets and passwords on the server after you have patched. Depending on your environment, this can include OS account passwords and SSH keys, the database password in the rConfig .env file, rConfig user passwords and API tokens, and the device credentials stored in rConfig.
What’s next
Section titled “What’s next”- rConfig Security Advisory rCFG-SA-2026-01 for the latest status and per-release impact tables
- Updating PHP for rConfig for moving to a newer supported PHP version
- V8 Pro Docker setup and updates for the full container update and rollback procedure