What is PHP2Shell?
PHP2Shell groups two vulnerabilities in the PHP interpreter, CVE-2026-109618 and CVE-2026-109619, which can allow unauthenticated remote code execution (RCE). The PHP project rates both as critical (CVSS v4.0 9.2). They were disclosed on October 21, 2026, together with the fixed releases PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
CVE-2026-109618 is memory corruption in out-of-memory (OOM) error handling; CVE-2026-109619 is a use-after-free in internal state that a later request on the same worker can reuse.
They are actively exploited: CISA added both to its Known Exploited Vulnerabilities (KEV) catalog on October 26, 2026, and states that the Fragnesia kernel flaw (CVE-2026-46300) can be chained with them to implant PHP webshells and run commands as root.
Are you affected?
Short answer: if your server runs PHP to serve web requests and you have not installed the fixed update from your distribution or control panel, assume yes.
- According to the PHP project, all PHP installations serving web requests are at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The risk is highest with mod_php, where an unauthenticated request can trigger the attack before any application code runs, but PHP-FPM is not safe either: for CVE-2026-109619, PHP confirmed RCE against PHP-FPM when the application performs a suitable operation.
- Affected versions: the 8.2 to 8.5 branches before 8.2.35, 8.3.36, 8.4.27 and 8.5.12.
- PHP 8.1 and older are not safe: they no longer receive updates from the PHP project. You need your distribution's or control panel's backport, or a move to a supported branch.
According to Red Hat, systems without PHP, or that do not expose PHP to untrusted HTTP requests, are not affected.
How to check your server
These commands only read information. Find out which PHP serves your websites (php -v only shows the command-line one):
apache2ctl -M 2>/dev/null | grep -i php
httpd -M 2>/dev/null | grep -i php
systemctl list-units --type=service --state=running '*php*fpm*' --no-pager
ps -eo args | grep -E 'lsphp|php-cgi|php-fpm' | grep -v grep | head -20
On Debian and Ubuntu (empty output does not rule out ea-php, alt-php, lsphp, source builds or containers):
dpkg-query -W -f='${Package} ${Version}\n' 'php*-fpm' 'php*-cli' 'php*-cgi' 'libapache2-mod-php*' 2>/dev/null
On RHEL, AlmaLinux, Rocky Linux and CloudLinux (includes ea-php and alt-php):
rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE}\n' | grep -i php | sort
Many fixes are backports that keep an old version number: look for the CVE IDs in the changelog (replace ea-php84 or alt-php85 with your branch).
rpm -q --changelog php-cli | grep -E 'CVE-2026-(109618|109619)'
rpm -q --changelog ea-php84-php-cli | grep -E 'CVE-2026-(109618|109619)'
rpm -q --changelog alt-php85-common | grep -E 'CVE-2026-(109618|109619)'
An empty result does not prove the fix is missing: some native CloudLinux packages moved to 8.2.35 or 8.3.36 without naming the CVEs. Fixed versions (or later) as of November 12, 2026:
-
Debian 12:
php8.2 8.2.35-1~deb12u1. 13:php8.4 8.4.27-1~deb13u1. -
Ubuntu 22.04:
php8.1 8.1.2-1ubuntu2.28. 24.04:php8.3 8.3.6-0ubuntu0.24.04.13. 26.04:php8.5 8.5.4-0ubuntu1.5. -
RHEL and derivatives: on 10,
php 8.3.36-1.el10_2andphp8.4 8.4.27-1.el10_2. On 9,php 8.0.30-8.el9_8.1and thephp:8.28.2.35 andphp:8.38.3.36 modules. On 8, thephp:8.28.2.35 andphp:7.47.4.33-8 modules. -
cPanel: EasyApache 4 25.91 moves
ea-php82throughea-php85to 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and backports the fix toea-php74,ea-php80andea-php81(since 25.94 they report 7.4.34, 8.0.31 and 8.1.35).
For other releases, check your distribution's security tracker (see Sources).
How to mitigate
According to PHP, only updating is a complete fix.
| Option | Durable? |
|---|---|
| A: update PHP | Yes, this is the fix |
B: disable session.upload_progress
|
Temporary and partial, until PHP's next regular release |
| C: Imunify360 WAF rules | Temporary, Imunify360 only |
Option A: update PHP and restart every worker
Debian and Ubuntu. The php* pattern also matches unrelated packages such as phpMyAdmin: simulate first with -s and review the list before upgrading.
sudo apt-get update && sudo apt-get -s install --only-upgrade 'php*' 'libapache2-mod-php*' # review the list, then run again without -s
RHEL, AlmaLinux and Rocky Linux (enabled module stream; does not cover ea-php or alt-php). For the same reason, review the list dnf shows before confirming and do not use -y.
sudo dnf upgrade --refresh 'php*'
cPanel. These commands upgrade ea-php and restart Apache and PHP-FPM (on CloudLinux 7 use yum instead of dnf; this does not apply to cPanel on Ubuntu). The restart is soft: if the workers did not restart, repeat with --hard.
dnf clean all && dnf upgrade "ea-php*"
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
CloudLinux (alt-php). Run this (on CloudLinux 7, yum clean all && yum update "alt-php*"), then restart Apache, PHP-FPM or LiteSpeed:
dnf clean all && dnf upgrade "alt-php*"
DirectAdmin. The October 21, 2026 build updates PHP 8.2 through 8.5 and patches 8.1, 8.0 and 7.4. You must trigger it manually unless the CustomBuild cron is enabled. da build php compiles PHP, which takes time and is CPU-heavy. Check the result with da build versions and confirm that the PHP processes restarted (see "After mitigating").
da update
da build php
Containers. Rebuild your images on updated bases: the official Docker php image or, once they are updated, RHEL/UBI.
Restart every worker. A reload is not enough, because workers may retain affected state. The restart interrupts in-flight requests, so pick a quiet moment. Run only the lines that apply to you (on Debian and Ubuntu, replace php8.3-fpm with your FPM unit):
sudo systemctl restart php8.3-fpm # Debian/Ubuntu: PHP-FPM
sudo systemctl restart apache2 # Debian/Ubuntu: mod_php
sudo systemctl restart httpd # RHEL: mod_php
sudo systemctl restart php-fpm # RHEL: PHP-FPM
Option B: disable session.upload_progress (temporary)
For CVE-2026-109619, PHP recommends session.upload_progress.enabled = 0. It blocks the confirmed paths, not every variant. Apply it in one place only (ini_set() and .user.ini do not work).
In php.ini, write the value 0: uncommenting the line shipped in /etc/php.ini leaves the feature enabled.
session.upload_progress.enabled = 0
In a PHP-FPM pool file:
php_admin_value[session.upload_progress.enabled] = 0
On PHP 8.5 only, also disable fatal error backtraces (this blocks only that path), for example in the FPM pool:
php_admin_value[fatal_error_backtraces] = 0
Restart every worker. Make sure no .htaccess, virtual host php_value or .user.ini turns it back on, and confirm the value with a temporary phpinfo() page (php -i shows the command-line configuration); delete it right away, because it exposes your configuration. Side effect: applications that use PHP's native session upload progress reporting stop receiving that data.
Option C: Imunify360 WAF rules (temporary)
According to CloudLinux, Imunify360 web application firewall (WAF) rulesets 8.83 to 8.88 block known exploits and the public exploit tool. This is interim, not a fix.
After mitigating
- Repeat the checks and confirm that every PHP process (and Apache) started after the update; older ones still run the vulnerable code:
ps -eo pid,lstart,args | grep -E 'php-fpm|lsphp|php-cgi|apache2|httpd' | grep -v grep - Keep
session.upload_progress.enabled = 0after updating, as PHP recommends, until its next regular release. This protects against CVE-2026-115560, an unlikely third flaw with no fix yet that only affects applications that changesession.serialize_handlerat runtime. - If the server was exposed while unpatched, review it. Imunify360 ruleset 8.86 logs responses that set a PHP session cookie containing a NUL byte as suspicious, and PHP warns that the absence of log entries does not prove there was no attack. If you find signs of compromise, rotate the credentials PHP had access to and also apply your distribution's kernel update for Fragnesia.
Need help?
Open a ticket at soporte.telecu.cloud and reference: CVE-2026-109618 / CVE-2026-109619.
Sources
- PHP project: security advisory and fixed releases
- PHP project: advisory GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)
- CISA: KEV catalog
- Red Hat: security bulletin RHSB-2026-013 "php2shell"
- Red Hat: CVE data and RHEL errata
- Debian Security Tracker: CVE-2026-109618
- Ubuntu: security notice USN-8948-1
- cPanel: EasyApache 4 change log (25.x)
- CloudLinux: PHP packages and Imunify360
- DirectAdmin: staff announcement on the forum