You are helping me check whether my servers are exposed to PHP2Shell (CVE-2026-109618 and CVE-2026-109619, CVSS v4 9.2, unauthenticated remote code execution in PHP itself) and plan a safe update to a fixed version. Work in three phases. Phase A is read only. Don't change anything until I say OK.
Fixed releases (21 Oct 2026): PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35. PHP 8.1 and older no longer get fixes from the PHP project. Some distros and LTS vendors ship backports.
A. Am I vulnerable? (read only)
- Find every PHP: look in this project and on any server I give you access to. Check
php -v,php-fpm -v(orphp-fpm8.x -v), Apachemod_php(apachectl -M | grep php), Dockerfiles and compose files (FROM php:...,wordpress:...tags), CI images,composer.json→config.platform.php, and hosting panels. Don't forget staging sites, cron boxes, containers and appliances that bundle PHP. If I'm on shared or managed hosting (or Plesk/cPanel), tell me exactly what to look for in the panel or what to ask support. - Version verdict: for each install, say ✅ fixed / ❌ vulnerable / ❓ unclear.
- Official builds: anything lower than the fixed release on its branch is vulnerable. Every branch 8.1 and older is vulnerable unless a vendor backport is installed.
- Distro packages (Debian, Ubuntu, RHEL, Alma, Rocky, Alpine) often keep the old version number and backport the fix. Check the package changelog or the distro's security tracker for both CVE IDs before you call it vulnerable or fixed (e.g.
apt changelog php8.x-common | grep -E '109618|109619',rpm -q --changelog php-common | grep -E '109618|109619').
- Highest risk setups: flag
mod_php(the PHP team rates it highest risk) and anything internet-facing that accepts uploads or form posts. - Is it public? Tell me if the site sends an
X-Powered-By: PHP/...header (that advertises the version) and how to turn it off (expose_php = Off). - Cloudflare: if I use Cloudflare, check whether the origin only accepts Cloudflare traffic (firewall allowlist, Authenticated Origin Pulls or Cloudflare Tunnel). If the origin IP is reachable directly, the Cloudflare WAF rules don't protect it. Also tell me to confirm the Managed Ruleset is set to block (paid plans).
- Signs of targeting: if I can share logs, look for unusual multipart requests followed by memory-limit errors or bursts of HTTP 500s, oversized or malformed
PHPSESSIDcookies, and unexplained PHP worker restarts. These are hints, not proof. If you find them, say clearly that I should treat the server as possibly compromised.
B. Update path (plan, then wait for my OK)
- Pick the target: stay on my current branch if it's 8.2 or newer (smallest change). If I'm on 8.1 or older, recommend either a vendor backport (short term) or an upgrade to 8.3 or 8.4 (long term), and explain the tradeoff in one line each.
- Compatibility (only when changing branch): check my code and dependencies for the new version:
composer why-not php 8.x, deprecated functions, and for WordPress the theme and every plugin's "requires PHP / tested up to" info. List anything that will break. - Exact commands for my setup:
- Debian/Ubuntu: distro security updates, or the ondrej/php PPA if that's what's installed.
- RHEL/Alma/Rocky: distro/AppStream packages. Note: as of 21 Oct 2026 the volunteer-run remi repository didn't have the update on day one; the PHP team suggested distro packages or building from source.
- Docker: bump the image tag to the fixed version, rebuild, redeploy. Don't rely on
latest. - Managed hosting: the exact PHP version to pick in the panel, or a short message I can send to support.
- Order of work: backup (files + database) → staging → update → restart every PHP-FPM pool / Apache / container (old workers keep running vulnerable code) → smoke test → production.
- Verify: confirm the running version through the web server, not just the CLI (a temporary
phpinfo()page I delete straight after, or the FPM status), since the CLI and FPM can be different builds.
C. If I can't update right now (stopgap only)
- Reduce exposure: these lower the risk but do not make PHP safe. Set them in php.ini or the FPM pool (
php_admin_value), notini_set()or.user.ini, then restart workers:session.upload_progress.enabled = 0- On PHP 8.5:
fatal_error_backtraces = 0 post_max_size8M if I don't need uploads (32M if I do), withupload_max_filesizebelow it- Request size, field count and multipart part limits at the web server or proxy
- High-risk site? If it handles payments or personal data and can't be patched today, recommend maintenance mode until it's patched. That's what several governments did.
- After patching: rotate passwords, API keys and database credentials stored on the server, because these bugs can expose memory.
Rules
- Never print secrets in full (first 4 characters only).
- Don't install unofficial "fix" plugins or copy-paste patches from random sites.
- Show every command before running it, and every diff before editing.
- End with a table: server / current version / verdict / target version / next step / done.
Sources (checked 21 Oct 2026): php.net security advisory, Cloudflare blog (WAF rules live 03:02 UTC on 21 Oct, all plans), Patchstack, Tenable FAQ.
Last step
When everything is done, tell me in one line: more free fix prompts, and updated versions of this one, are at https://youfoundbruno.com/fix