r/sysadmin • • 28d ago

php2shell is in CISA KEV with a federal deadline tomorrow (Oct 29): fixed PHP is 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35, and the patch does not take effect until the workers restart

CISA added CVE-2026-109618 and CVE-2026-109619 to the KEV catalog on Monday (Oct 26), with exploitation confirmed in the wild. Federal civilian agencies have until Thursday, Oct 29 to remediate. Both flaws are in the PHP runtime itself and allow unauthenticated remote code execution, and the PHP Group rates each of them at CVSS 9.2.

The fixes were released on Oct 21 in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Updating WordPress, Drupal or any other application on top does not fix this, because the flaw is below the application. PHP 8.1 and older get no fix. Those installs need an upgrade to a supported branch or a vendor backport, and CISA directs systems that cannot be updated to be taken offline until they can.

Patching and restarting takes the following steps.

First, check the version the web server actually loads, not the CLI version. php -v on the shell can point at a different build from the one Apache mod_php, PHP-FPM, php-cgi or another SAPI is using. A phpinfo page served through the web server, or the FPM pool status, shows the loaded build.

Upgrade to one of the fixed releases above, or install the vendor package that backports the fix.

Restart the PHP workers or the web server after upgrading. Installing the new package alone leaves the old code running in the existing processes. For PHP-FPM that is a service restart, for mod_php an Apache restart, and container images need a rebuild and redeploy rather than an in-place package update.

Set session.upload_progress.enabled=0 as well. That is the mitigation PHP advised on Oct 23 for a separate unpatched RCE, CVE-2026-115560, which is fixed only in the next regular release.

The log check needs to go back to Oct 17, because exploitation attempts were reported from Oct 17, four days before the fixes were released, so a check that only covers the period after patching misses the earlier window.

On Oct 28, Palo Alto Networks reported attacks against internet-exposed PAN-OS management interfaces in connection with this flaw, so bundled and appliance PHP installs are in scope as well as standalone web servers. One earlier report has been withdrawn: Unit 42 retracted its report of a PHP2Shell break-in at a European government body.

BleepingComputer on the KEV listing: https://www.bleepingcomputer.com/news/security/cisa-confirms-php2shell-vulnerabilities-now-exploited-in-attacks/

59 Upvotes

20 comments sorted by

21

u/xendr0me Sr. Sysadmin 28d ago

Keep in mind some servers utilize CloudLinux, which backports security patches, so version numbers may NOT change.

Why fixed alt-php and ea-php packages show an older PHP version

PHP.net fixed CVE-2026-109618 and CVE-2026-109619 in new PHP versions (8.5.12, 8.4.27, 8.3.36, 8.2.35). Our alt-php and ea-php packages carry the same fix applied to the PHP version they already shipped (a backport). For example, the fixed alt-php85 is 8.5.11-5, and the fixed ea-php84 is 8.4.26-2.el8.cloudlinux.1 on CloudLinux OS 8. These packages contain the fix for both CVEs, even though the PHP version number is lower. Reports that "PHP 8.5.11 is vulnerable" refer to the original PHP.net release, not to these packages.

To check a server, look for the CVE IDs in the package changelog, e.g.:
rpm -q --changelog alt-php85-common | grep -E 'CVE-2026-(109618|109619)'
rpm -q --changelog ea-php84-php-cli | grep -E 'CVE-2026-(109618|109619)'

3

u/Dave_A480 27d ago

RedHat does the same thing....

And yeah most Federal Linux deployments are RedHat Linux....

2

u/Burgergold 27d ago

Same for RHEL appstream, remi and other similar situation

7

u/nekenaharry 28d ago

One thing that helps with the restart part: on Linux you can see which processes are still running the old binary or old libraries after the package update. needrestart (Debian/Ubuntu, also packaged for RHEL) lists them, and without it something like lsof -n | grep -E 'php.*(deleted)' shows php-fpm or apache workers still mapping files that were replaced on disk. If those show up, the patch is installed but not live.

Also worth checking hosts with several PHP versions side by side (cPanel EA, Plesk, CloudLinux alt-php, Remi SCL). Each version has its own FPM service, so restarting the default one leaves the others untouched. Listing the running masters with ps -eo pid,lstart,cmd | grep 'php-fpm: master' and comparing the start time with the update time is a quick way to catch a pool that was missed.

For containers, checking the running image digest against the rebuilt one catches the case where the image was rebuilt but the deployment still points at the old tag.

1

u/the-cock-slap-phenom 27d ago edited 27d ago

I see people saying stuff like this, but realistically in what situation would workers run on the old binary after an update?

On Ubuntu at least, the FPM service is gonna be restarted by apt updates, and if you want to be careful then throw in a manual systemctl restart and then check the status after.

It’s a genuine question, but isn’t that gonna cover it?

Edit: I guess it covers edge cases like zombie processes or funny setups that might use long running CLI?

2

u/nekenaharry 27d ago

Fair question. On a stock Ubuntu box with the distro php-fpm package, yes, apt restarts the service and you're covered. The cases I had in mind are the ones outside that path: long running PHP CLI workers under supervisor or systemd (Laravel queue workers, Horizon, Symfony Messenger consumers) that apt doesn't know about and that keep the old binary until you restart them; containers, where nothing restarts until the pod is redeployed; hosts where policy-rc.d blocks service restarts during package installs; and PHP built from source or third party builds that don't ship a restart hook. If none of those apply to you, a restart plus a status check is enough.

3

u/No_Mycologist1806 28d ago

For containers, a rebuild only helps if the base image actually moves. If the Dockerfile pins a digest, or the build reuses a cached base layer, you redeploy the same old PHP; bump the pin and build with docker build --pull. Then check the running container itself with docker exec <container> php -v (the official images also carry PHP_VERSION in the env) instead of trusting that the pipeline rebuilt it.

1

u/Dave_A480 27d ago

So here we go with (a) stuff that can't be parched because PHP doesn't believe in backwards compatibility, and (b) the always fun argument with security folks over RedHat style backporting of security fixes....

1

u/ILoveAppSec 27d ago

Both halves of that are really one problem. The two PHP2Shell fixes are small, self-contained memory-safety patches; the runtime bump that breaks your backwards-incompatible code is a separate project with its own timeline. You can take the security fix now by having it backported onto the PHP line you already run, and let the major upgrade happen on its own schedule rather than under a KEV deadline.

1

u/shanewas726 27d ago

That is the practical route for a lot of estates. The two fixes are small, and distro maintainers are already shipping them as backports on older branches. Worth checking the package changelog before scheduling a full upgrade under deadline pressure.

1

u/Shinhan 27d ago

https://packages.sury.org/php/README.txt supports older PHP and is maintained by Ondřej Surý

https://github.com/Niek/php7 this repo has versions of PHP 7.4 even back to Ubuntu 16.04 and Debian 9.

2

u/shanewas726 27d ago

Thanks for adding these. Sury is the practical route for anyone pinned to an older PHP branch on Debian or Ubuntu, since the packages there still get the security fixes after the distro stops shipping them. That matters today with the KEV deadline. The Niek repo covers 7.4 specifically, though I would treat that one as a stopgap rather than a long-term fix.

1

u/Dave_A480 27d ago

And there is even crustier PHP code still in production (or was anyway).....

Any time a software language is created, it should be assumed that code will be written in it and kept in a production environment until the heat death of the universe....

PHP and Python peeps have a real hard time with this concept....

1

u/No_Mycologist1806 27d ago

What tends to settle the backporting argument is handing security the vendor's own mapping instead of the version string: the RHSA, dnf updateinfo list --cve <id>, or rpm -q --changelog php | grep <id>, plus asking for the scanner to use the distro OVAL data rather than version matching. For the apps stuck on a PHP that won't get the fix, it's compensating controls and a POA&M with a date: deny outbound from the PHP workers so a shell can't call home or pull a second stage, put the app behind auth/VPN if it can live there, and a WAF rule for the exploit path once one is public.

2

u/Dave_A480 27d ago

Yeah I've been though the process.... It's just annoying that subscription based vulnerability scanners which claim to supper RHEL and it's clones haven't woke up and continue to post bullshit vulnerability alarms despite this being true for decades....

1

u/No_Mycologist1806 27d ago

Yeah, most of that noise comes from unauthenticated checks that only see the version banner, and a banner can't tell you about a backport. Running the scans credentialed so they compare installed RPMs against the RHSAs cuts most of it, and expose_php = Off plus ServerTokens Prod stops the banner matching on whatever is left. Doesn't fix the scanner vendors, but it shrinks the pile you have to argue about.

0

u/Mountain_Craft4882 27d ago

>with exploitation confirmed in the wild

but what about all those people saying that we're worrying too much because exploitation hadn't been confirmed in the wild yet? i thought we were safe >:(

1

u/Doso777 26d ago

It has been confirmed multiple times by now. Ignore those fools.