CVE Tools
PHP2Shell (CVE-2026-109618, CVE-2026-109619): how to protect your PHP servers. Full guide

PHP2Shell (CVE-2026-109618, CVE-2026-109619): how to protect your PHP servers. Full guide

Two critical remote code execution flaws in PHP itself. Fixes are out: 8.5.12, 8.4.27, 8.3.36, 8.2.35. Attack chains, what's confirmed, and a step-by-step defence guide.

Updated 2026-10-22live record →

PHP branchFixed versionNotes
8.58.5.12Also set fatal_error_backtraces=0 if you cannot update at once (blocks one confirmed path only).
8.48.4.27
8.38.3.36
8.28.2.358.2 reaches end of life on 31 December 2026 — plan the move to 8.3+.
8.1, 8.0, 7.4No releaseEnd of life. The PHP project published source backports only (no numbered releases) — see "Older PHP: who ships a fix" below.
7.3 and olderNo fixNothing from the PHP project. Some vendors patch these branches themselves — see "Older PHP: who ships a fix" below.
  • Where to get it: php.net downloads (Windows builds on the same page). Linux distributions and LTS vendors received the patches in advance — check your vendor's repository first.
  • Distributions: AlmaLinux moved patched packages for PHP streams on AlmaLinux 8, 9 and 10 to production at 21:15 UTC on October 21 (AlmaLinux). The volunteer-run rpms.remirepo.net had no updates on release day.
  • Exploitation: Amazon reports an attempt against its honeypot on October 17, four days before disclosure, and more on October 21. CISA said it had not observed exploitation when it published, and neither CVE is in CISA KEV as of this update. Details in the follow-up article.
  • Cloudflare switched on WAF rules for all plans (free included) about 9 hours before disclosure — a stopgap, not a fix (Cloudflare).

Older PHP: who ships a fix

The PHP project issues releases only for 8.2–8.5. For everything older, the fix comes from your Linux vendor, a commercial long-term-support vendor, a community packager, or your own build. Status below is as of October 22, 2026 and changes by the hour — check the linked page, and confirm the CVE ids in the package changelog before you trust a version number.

WhoBranchesStatus (Oct 22)Where to read
PHP project (php.net)7.4, 8.0, 8.1Minimal source backports, no releases, "to help people building from source or without access to an LTS vendor". A third-party build write-up reports the backport forces session upload progress off whatever php.ini says. 8.1 and older receive no updates. 7.3 and older: nothing.php.net notice; branches 7.4, 8.0, 8.1; Josh Bowen: building 7.4 in a container
Ubuntu (Canonical)22.04 php8.1; 20.04 php7.4; 18.04 php7.2; 16.04 php7.0; 14.04 php522.04: fixed 8.1.2-1ubuntu2.28 (free). 20.04: 7.4.3-4ubuntu2.29+esm5 (Ubuntu Pro, Legacy Support add-on). 18.04: 7.2.24-0ubuntu0.18.04.17+esm14, 16.04: 7.0.33-0ubuntu0.16.04.16+esm22, 14.04: 5.5.9+dfsg-1ubuntu4.29+esm18 (all Ubuntu Pro). USN-8948-1 and -2 (Oct 21).CVE-2026-109618 on ubuntu.com
Debian13 php8.4; 12 php8.2; 11 php7.413: 8.4.27-1~deb13u1 (DSA-6574-1). 12: 8.2.35-1~deb12u1 (DLA-4848-1, Oct 21). 11 (php7.4): no entry in the tracker — Debian LTS for 11 ended 31 Aug 2026 per one write-up; the paid options below cover it.Debian tracker
AlmaLinux8: php 7.2, 7.3, 7.4, 8.0, 8.2; 9: 8.0, 8.1, 8.2, 8.3; 10: 8.3, 8.4Patched packages in production since 21:15 UTC on Oct 21, including streams past their end of life ("future fixes are not guaranteed"). php:7.2 is the default stream on AlmaLinux 8.AlmaLinux notice — exact versions and commands
Red HatRHEL module streamsRated Important; mitigation procedure in bulletin RHSB-2026-013. The public CVE page did not show per-stream errata when we read it: run dnf updateinfo list --cve CVE-2026-109618.Red Hat CVE page
Ondřej Surý (deb.sury.org, ppa:ondrej/php)Debian and Ubuntu, all branches he shipsReported, not confirmed on his own pages: backports for EOL branches; php7.4 7.4.33-31 carries the fix (per a build write-up); arm64 builds lagged amd64. Verify the changelog yourself.sury.org
Remi (remirepo.net)RHEL-familyThe PHP project said Remi would have no updates on release day. A later Habr guide says builds for all supported versions had appeared by Oct 22. No promise for 7.4, 8.0 or 8.1.Remi's blog
TuxCare (ELS for Runtimes)8.1, 8.0, 7.0–7.4, 5.x (exact branches vary by platform)PHP 7.4 builds out on nearly every supported Linux platform; others "rolling out branch by branch". Installs as alt-php* under /opt/alt/ through yum, dnf or apt. Also used by cPanel as alt-phpXX in MultiPHP Manager.TuxCare guide, ELS PHP docs
HeroDevs (Never-Ending Support)not statedLists CVE-2026-109618 as fixed in its NES for PHP; the page does not say which old branches.HeroDevs
Freexian (PHP LTS)PHP 5.6, 7.0–7.4, 8.0–8.5 on Debian 9–13 and Ubuntu 18.04–26.04Paid APT repositories. Its product page does not mention these CVEs — ask them for status before relying on it.Freexian PHP LTS
Zend (ZendPHP LTS)7.2–8.1 (per a secondhand post)A secondhand report says Zend's LTS builds had the fix at release. We could not find a Zend advisory for these CVEs on its security centre; ask Zend.Zend security centre

What to do if you run an older PHP

  1. Find out where your PHP comes from — distribution package, ppa:ondrej/php, Remi, a panel (cPanel, Plesk), a Docker image, or a custom build — and which branch (php -v through the web server, not the CLI).
  2. Use the matching row above. If your vendor ships a fix, install it, restart every FPM pool, Apache and worker, and check the package changelog for CVE-2026-109618 and CVE-2026-109619. A version number such as 7.4.33 stays the same after a backport.
  3. No vendor fix? Choose one: buy extended support (TuxCare, Freexian, HeroDevs, Zend), build PHP from the project's source backport (and treat it as a bridge — other bugs found since the branch ended stay unfixed), or move to a supported branch.
  4. Not patched yet? Apply PHP's interim settings, put a WAF in front, and restrict the site to trusted IPs or take it offline, as CERT-EU, the NCSC and the NSA advise.
  5. Plan the move. Supported branches are 8.5 (security fixes until 31 Dec 2029), 8.4 (2028), 8.3 (2027) and 8.2 (31 Dec 2026) — see php.net supported versions. Containers on EOL base images (for example Debian 11) will not get further OS updates.

The PHP project has released fixes for two critical vulnerabilities, both rated CVSS v4.0 9.2: CVE-2026-109618 (RCE via out-of-memory corruption) and CVE-2026-109619 (RCE via stale global state). Both let an unauthenticated remote attacker run code in PHP itself — not in a framework or a plugin. The pair is nicknamed PHP2Shell. If you run PHP on a public web server, update now and restart every worker. Below: what is confirmed, how the attack works, and a defence checklist for every common setup.

What is confirmed

  • PHP's official advisory (Oct 20–21): fixes for 8.5.12, 8.4.27, 8.3.36, 8.2.35; both bugs CVSS v4.0 9.2, unauthenticated RCE. The advisory says all PHP installations serving web requests are affected — PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed — and rates mod_php the highest risk, citing a demonstrated exploit where an unauthenticated request triggers the attack before any application code runs.
  • CVE-2026-109618 (GHSA-w8hw-w9fx-j79w): out-of-memory handling can interrupt PHP while internal request data is only partly initialised; request cleanup then treats the invalid data as valid.
  • CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp): request-owned internal state survives after its memory was freed, and a later request on the same worker can use it.
  • CERT-EU advisory 2026-018: prepare to patch; isolate internet-facing PHP applications if you cannot patch quickly.
  • Not in CISA KEV as of this update. CISA said it had not observed exploitation when it published; Amazon, watchTowr and Cloudflare report attempts (see the table above and the follow-up article).

What is still disputed or unverified

  • Affected versions. PHP's advisory gives fixed versions but no affected range per branch. Calif's write-up traces the earliest affected code path to PHP 5.4.0, per Tenable; other reports say "PHP 5 onward".
  • Score. The official rating is 9.2 (CVSS v4.0). The identifiers that leaked early carried an incorrect 10.0, and watchTowr also rated it 10.0. Our own records for both CVEs currently show a CVSS v3.1 base of 8.1.
  • Public PoC. Code claiming to exploit the flaws is circulating, and a video demonstrates an exploit chain. The PHP Foundation said its team inspected early PoCs and did not find functional exploits at the time of disclosure. Treat anything you download as potential malware.
  • How widespread exploitation is. Reports conflict: Amazon says "broadly exploited" and Patchstack and Hadrian claim active incidents, while Huntress saw no confirmed successful exploitation across its customers. See the follow-up article for the sources.

Why this one is urgent

PHP runs a large share of the web: WordPress, WooCommerce, Magento, Shopware, Drupal, Nextcloud, Laravel apps and countless custom sites. The bugs sit in PHP's request handling — they fire before your application code runs, so a plugin update, a login check or an app-level firewall will not cover them. Updating WordPress core or a plugin does not fix this; the PHP runtime has to be updated, and if your host manages PHP, the host has to do it. The patch is public, so attackers can diff it.

The four bugs behind the two CVEs (Wiz)

Wiz Research, one of the teams that reported the flaws, says all of them are memory-safety bugs in how PHP handles fatal errors — especially out-of-memory errors — while serving a request. The request ends unexpectedly, PHP frees its memory, but some internal state keeps pointing at it. A later request or worker reuses that stale state, which lets an attacker read or corrupt memory (Wiz, Oct 21). Wiz reported four such bugs and groups them under the two CVEs; it also says there are other tracked and untracked variants that the patch removes at the root.

Wiz's groupingBugWhat Wiz demonstrated
CVE-2026-109618Upload-progress unserializer use-after-freePre-authentication RCE on WordPress, Drupal and Joomla (latest container images at the time of testing)
CVE-2026-109618Remote process-memory disclosureUnauthenticated reading of live PHP worker memory belonging to other requests; works even if the app never calls session_start()
CVE-2026-109619Fatal-error backtrace use-after-freePre-authentication RCE on Drupal
CVE-2026-109619OPcache type confusion (shared memory, across workers)Pre-authentication RCE on WordPress

Attack chains

1. From a request to a compromised server

PHP2Shell: expected attack chain on an unpatched server

  1. Internet-wide scan for PHP — Attackers fingerprint hosts that run PHP (`X-Powered-By` headers, `.php` URLs, known CMS paths).
  2. Crafted request — A crafted request to a PHP script — no login needed. PHP's advisory describes a demonstrated exploit against mod_php where the attack fires before application code runs.
  3. Hits the PHP engine before app code — PHP parses the request body before your code runs, so plugins, middleware and app rules never see it.
  4. Reported root cause — Out-of-memory corruption (CVE-2026-109618) and stale global state reused by a later request (CVE-2026-109619), per PHP's advisory.
  5. Fixed PHP build installed? — Fixed in 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35 (released Oct 21).
  6. Blocked — The patched engine handles the request safely.
  7. Code execution as the PHP worker — Commands run as the FPM / Apache user (e.g. `www-data`) — with access to everything the website can read.
  8. Webshell / persistence — Typical next step: a backdoor `.php` file, `.user.ini` / `auto_prepend_file`, a cron job or an SSH key, so access survives the patch.
  9. What runs on the box?
  10. Store: payment skimmer — Sansec flags Magento, Shopware and WooCommerce as exposed; on shops the classic payload is a card skimmer in checkout.
  11. Secrets and database stolen — `wp-config.php`, `env.php`, `.env` hold database and API keys → data theft and access to other services.
  12. Pivot, spam or mining — The server becomes a foothold into the internal network, or is reused for spam and cryptomining.

2. From the patch to mass exploitation

Patch release → exploit → mass scanning

  1. Fixed PHP released — Released Oct 21, 2026.
  2. Attackers diff the source — Comparing old and new code points straight at the vulnerable function.
  3. Working exploit — watchTowr reproduced the flaws; exploit code of unknown quality is circulating.
  4. Mass scanning — Amazon logged a first attempt on Oct 17 and more on Oct 21.
  5. Your servers updated?
  6. Safe — Fixed build installed, every FPM pool and worker restarted.
  7. Compromised — Late patching, a forgotten host, or an end-of-life branch with no fix at all.

Am I exposed?

A quick decision path

  1. Do you run PHP anywhere? — Include the hidden ones: CMS sites, phpMyAdmin, admin panels, staging, vendor appliances and containers.
  2. Reachable from the internet?
  3. Lower urgency — still patch — Internal-only hosts are reachable from a compromised neighbour.
  4. Which PHP branch?
  5. Install the fix now — 8.5.12, 8.4.27, 8.3.36, 8.2.35.
  6. Backport, upgrade or isolate — 8.1 and older get no official release, only source backports. Use a vendor backport, build the backport, move to 8.2+, or take the site off the internet.
  7. Meanwhile: interim layers — Do your sites accept file uploads?
  8. Apply PHP's interim settings + limit multipart — No uploads needed → block `multipart` at the web server for all PHP routes.
  9. Upload progress off + allowlist — Uploads needed → allow multipart only on known upload routes, restrict those to trusted users or IPs.
  10. Patch, restart, verify via the web server — Check the PHP build in a request served by FPM / Apache, not on the CLI.

Step 1. Find every PHP install

The host you forget is the one that gets owned. CERT-EU's first recommendation is to identify all PHP-based applications. Look beyond the main site: staging, old marketing sites, phpMyAdmin and admin tools on subdomains, vendor appliances, containers.

# Debian/Ubuntu: installed PHP branches
ls /etc/php

# PHP binaries and Apache modules outside the usual paths
find / -xdev \( -name 'php' -o -name 'php-fpm*' -o -name 'php-cgi*' -o -name 'libphp*.so' \) -type f 2>/dev/null

# Running containers built on PHP images
docker ps -q | xargs -r -I{} docker exec {} sh -c 'echo "{} $PHP_VERSION"' 2>/dev/null | grep -v ' $'

# What a site reveals from the outside
curl -sI https://example.com | grep -i x-powered-by

For each host write down the branch, where PHP came from (distro, PPA, Docker image, panel), the SAPI (FPM, mod_php, CGI) and whether it faces the internet. php -v on the command line can differ from what the web server actually loads — check the Server API row of a private phpinfo() page and delete it right after.

Step 2. If you cannot patch at once: PHP's interim settings

PHP's advisory lists interim settings. They reduce exposure to the confirmed paths only and do not make an installation safe — patch as soon as you can. For CVE-2026-109619, set session.upload_progress.enabled = 0 (it disables only upload progress bars; normal uploads keep working) and restart every worker. PHP says to set it in php.ini, an FPM pool or server config that applies before request parsing — not with ini_set() or .user.ini.

SetupWhere to set itApply
Own server, any SAPIphp.ini or a file in conf.d/: session.upload_progress.enabled = 0Restart PHP-FPM / Apache
PHP-FPM (recommended)Each pool, e.g. /etc/php/8.3/fpm/pool.d/www.conf: php_admin_flag[session.upload_progress.enabled] = offsystemctl reload php8.3-fpm for every branch
Apache mod_php, no php.ini access.htaccess: php_flag session.upload_progress.enabled offImmediate (needs AllowOverride Options or All)
Shared hosting / FPM / CGI, no php.ini accessAsk the host or use the panel's PHP settings. .user.ini works on some setups but PHP advises against relying on itUp to 5 min (user_ini.cache_ttl) — not a reliable control
cPanel / Plesk / DirectAdminMultiPHP INI Editor or the PHP settings page, per domain and versionPanel applies it
DockerCopy an ini into /usr/local/etc/php/conf.d/ in your imageRebuild and redeploy
  • Wrong file = 500 error. php_flag in .htaccess breaks PHP-FPM/CGI sites, and .user.ini is ignored under mod_php. Load the site after each change.
  • Lock it. php_admin_flag in the FPM pool cannot be overridden by an application or a .user.ini. Look for stray overrides: find /home /var/www -maxdepth 6 -name .user.ini.
  • Verify through the web server, not the CLI: a private phpinfo() must show session.upload_progress.enabled = Off.
  • PHP 8.5 only: set fatal_error_backtraces=0 and restart every worker. It blocks only the confirmed fatal-backtrace path.
  • Fix attacker-reachable fatal errors and timeouts in your code (callbacks, upload or import processing, cleanup) and remove invalid or deprecated per-request settings. Hiding errors with error_reporting, display_errors or @ does not help.

For CVE-2026-109618 (out-of-memory corruption), PHP's advisory suggests:

  • memory_limit=-1, preferably via php_admin_value in the FPM pool or Apache config so applications cannot override it. It sounds backwards — the point is to avoid hitting the out-of-memory path inside PHP.
  • A low post_max_size (8M without file uploads, 32M if you need them) with upload_max_filesize below it.
  • Limits at the web server or proxy for decoded request size, input field count, multipart part count, header count and nesting depth — including requests without a usable Content-Length.
  • A container or cgroup memory limit that kills only the affected worker. Do not use RLIMIT_AS or RLIMIT_DATA: they can trigger the vulnerable allocation failure.

Step 3. Optional extra layer: block or limit multipart requests

Early write-ups pointed at multipart/form-data requests as a likely trigger, and blocking them is a blunt extra layer while you patch. It is not part of PHP's official guidance and is not a fix: the trade-off is that file uploads and some forms stop working. If a site needs uploads, allow multipart only on the known upload routes and restrict those to logged-in staff or trusted IPs. Rules from admin write-ups:

# nginx — inside every server {} block, including default/catch-all ones
if ($http_content_type ~* "multipart") {
    return 403;   # use 444 if error_page routes errors to PHP
}
# Apache httpd (mod_rewrite)
RewriteEngine On
RewriteCond %{HTTP:Content-Type} multipart [NC]
RewriteRule ^ - [F,L]
# Use %{HTTP:Content-Type}, NOT %{CONTENT_TYPE} — the latter silently never matches
# Caddy / FrankenPHP — put it in the same route/handle block as php_fastcgi / php_server
@multipart header_regexp Content-Type (?i)multipart
respond @multipart 403
  • Test it with a multipart request to a .php URL and confirm the block in the access log: curl -sS -o /dev/null -w '%{http_code}\n' -F x=1 https://example.com/index.php should return 403.
  • Cloudflare / CDN WAF: a custom rule blocking multipart works only if attackers cannot reach the origin directly — restrict ports 80/443 to the CDN's IP ranges.
  • ModSecurity: a narrower rule denies requests whose body contains the PHP_SESSION_UPLOAD_PROGRESS field (needs SecRequestBodyAccess On). WAFs parse multipart differently from PHP, so treat it as an extra layer only.
  • Admin tools such as phpMyAdmin or Adminer: restrict them to your own IPs now, whatever else you do.
  • Can't patch at all? CERT-EU recommends isolating internet-facing PHP applications from public networks until a fix is applied.

Step 4. Patch and restart everything

  1. Get the fixed versions from php.net (downloads) or your vendor — 8.5.12, 8.4.27, 8.3.36, 8.2.35 — not from social media or blog posts.
  2. Debian / Ubuntu: run sudo apt update, then apt-cache policy php8.3-fpm (repeat for every branch in /etc/php) to compare installed and candidate versions. Check apt-mark showhold — a held package silently skips the update.
  3. Backports keep the old version number. Distros often patch without bumping the upstream version, so check the package changelog for the CVE: zcat /usr/share/doc/php8.3-fpm/changelog.Debian.gz | head -20. If the CVE is not there, the package is not fixed yet.
  4. RHEL / AlmaLinux / Rocky: sudo dnf clean metadata && sudo dnf upgrade 'php*', then restart (systemctl restart php-fpm, or httpd for mod_php). AlmaLinux published fixed packages for every PHP stream on 8, 9 and 10, including end-of-life streams — see their notice for the exact versions and rpm -q php-common to verify. rpms.remirepo.net had no updates on release day: switch to distro packages or build from source.
  5. Restart every PHP process: each FPM branch (systemctl restart php8.x-fpm), Apache for mod_php, and long-running workers — queue workers, Laravel Horizon, Octane, schedulers, Swoole/RoadRunner. Find processes still running the old binary: ls -l /proc//exe 2>/dev/null | grep -i 'php.deleted'.
  6. Docker: the official php images are rebuilt from php.net sources. Pull the new base, rebuild your image, redeploy, and confirm with docker run --rm your-image php -v that it reports a fixed version. Old images stay vulnerable forever.
  7. Shared / managed hosting: ask the host to confirm that the patched build serves each of your domains. Switching the PHP version in cPanel, Plesk or CloudLinux does not prove the build is fixed.
  8. End-of-life branches (8.1 and older): the project issued no release, only minimal source backports for 7.4, 8.0 and 8.1. Use a vendor or LTS backport, build the backport yourself, or move to a supported branch. PHP 7.3 and older get nothing from the project.
  9. Plan ahead: PHP 8.2 reaches end of life on 31 December 2026.
  10. Re-check your config after the upgrade. Package updates can overwrite local ini files.

Step 5. Check whether you were already hit

Amazon Threat Intelligence logged the first exploitation attempt on October 17 — four days before disclosure — and recommends starting an investigation from that date, not from the release. Details leaked publicly around 15:00 UTC on October 20. Preserve web server and PHP logs before patching or log rotation.

# PHP-FPM workers crashing (memory corruption attempts often crash first)
grep -E 'SIGSEGV|signal 11|SIGBUS' /var/log/php*-fpm.log
journalctl -u 'php*-fpm*' --since '2026-10-17' | grep -Ei 'segfault|signal'

# PHP files created or changed since the leak
find /var/www -type f \( -name '*.php' -o -name '.user.ini' -o -name '.htaccess' \) -newermt '2026-10-17'

# Shells or tools started by the web user (www-data on Debian/Ubuntu)
ps -u www-data -o pid,ppid,lstart,cmd | grep -Ev 'php-fpm|apache2|nginx'
  • Look for multipart POSTs to URLs that never take uploads, and request bodies with a PHP_SESSION_UPLOAD_PROGRESS field when your app has no upload progress bar.
  • Wiz's hunting hints (Wiz): unusual multipart requests followed by memory-limit errors or repeated HTTP 500, unexpectedly large or malformed PHPSESSID response cookies, and unexplained PHP worker churn. Wiz notes these bugs run below the application layer, so application logs may show little.
  • Check persistence spots: auto_prepend_file / auto_append_file, new .user.ini files, cron and systemd timers, Supervisor configs, ~/.ssh/authorized_keys, new admin users in the CMS, mu-plugins in WordPress.
  • Watch for outbound connections from PHP workers and for sh, curl, wget or nc spawned by php-fpm — SigmaHQ's webshell rules plus auditd on the web user's execve calls catch most of this.
  • On stores, compare checkout templates and JavaScript against a clean copy to rule out a card skimmer.
  • Because one of the bugs can leak worker memory without a shell, a clean server is not proof that nothing was read. If you ran an unpatched, internet-facing PHP, consider rotating database passwords, API keys and tokens even when you find no intrusion.
  • If you find anything: isolate the server, rebuild it from a clean image, and rotate every secret the PHP user could read — database passwords, API keys, payment and mail credentials.

Notes for popular platforms

PlatformWhat to do
WordPressCore does not need upload progress, so turning it off is safe. Security plugins and Wordfence do not stop this. If you block multipart, media uploads and some form plugins break — allowlist /wp-admin/ for your IPs.
WooCommerce, Magento, ShopwareHighest-value targets (Sansec). Patch first, then check checkout pages for skimmers.
LaravelMaintenance mode and middleware run too late. Livewire / Filament uploads break under a multipart block. Restart queue workers, Horizon and Octane after patching. Vapor: rebuild Docker runtimes; native runtimes need Vapor's fixed runtime.
Nextcloud, Drupal, other upload-heavy appsDon't block multipart globally — turn off upload progress, restrict the instance to VPN or known IPs, and patch at release.
Docker / KubernetesRebuild images from the patched php base and roll out every deployment; check sidecars and cron jobs built on PHP too.
Shared hostingUse .user.ini or the panel's PHP settings; ask the host for written confirmation of the patched build.

General hardening (worth doing anyway)

  • expose_php = Off — stop advertising the PHP version in X-Powered-By.
  • Disable PHP extensions you don't use.
  • Run each site under its own FPM pool and system user, so one compromised site doesn't expose the rest.
  • disable_functions = exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec raises the bar after compromise — memory-corruption exploits have bypassed it before, so it is not a fix.
  • Keep a monitored inventory of PHP versions across your estate — this will not be the last emergency release.

Timeline (UTC)

  1. First exploitation attempt on Amazon's honeypot
    Four days before disclosure, per Amazon Threat Intelligence.
  2. Leak
    A Hacker News post reports two upcoming PHP RCE disclosures (15:20 UTC, per Sansec).
  3. PHP pre-announces a critical security release
    Two vulnerabilities, CVSS v4.0 9.2.
    source
  4. watchTowr confirms RCE, reproduces CVE-2026-109618
    source
  5. CERT-EU advisory 2026-018
    Identify PHP apps, prepare to patch, isolate if needed.
    source
  6. PHP releases 8.5.12, 8.4.27, 8.3.36, 8.2.35
    Advisory and fixes published; source backports for 7.4, 8.0 and 8.1. GitHub advisories appeared at 13:34 UTC.
    source
  7. Cloudflare WAF rules and distro packages
    Cloudflare's rules went live at 03:02 UTC; AlmaLinux packages reached production at 21:15 UTC.
    source
  8. Guide updated with released versions

FAQ

What is PHP2Shell?
The nickname for two critical remote code execution flaws in PHP, CVE-2026-109618 and CVE-2026-109619, rated CVSS v4.0 9.2 by the PHP security team. Fixes shipped on October 21, 2026: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
Is PHP2Shell being exploited in the wild?
Reports say yes, but they conflict. Amazon logged an attempt on October 17 and more on October 21; watchTowr and Cloudflare also report attempts. CISA said it had not observed exploitation when it published, and neither CVE is in CISA KEV as of October 22. Assume it is being scanned for and patch now.
Which PHP versions are affected?
PHP's advisory covers all installations serving web requests (FPM, mod_php, php-cgi, FrankenPHP, LiteSpeed) and gives fixed versions rather than ranges. Calif traced the earliest affected code to PHP 5.4.0. Fixed: 8.5.12, 8.4.27, 8.3.36, 8.2.35. 8.1 and older: no release, source backports only.
Does disabling session.upload_progress fix it?
No. It addresses CVE-2026-109619 on one confirmed path only; CVE-2026-109618 needs different settings, and PHP says updating is the only complete fix.
Does a WAF or Cloudflare protect me?
Partly. Cloudflare enabled WAF rules for all plans, but says to patch even with them, and attackers mutate payloads to evade them. Rules help only if the origin cannot be reached directly. They buy time; they do not replace the patch.
Does Wordfence or another WordPress security plugin help?
No. The bug is in PHP's request parsing, which runs before any plugin code — including Wordfence's prepend-file firewall.
Will PHP 7.4, 8.0 or 8.1 get a fix?
No official release. The PHP security team published minimal source backports for 7.4, 8.0 and 8.1 for people who build from source. Distribution and LTS vendors (for example AlmaLinux, TuxCare) ship patched packages for some end-of-life streams. PHP 7.3 and older get nothing from the project.
How do I check that my distro package is patched?
Look for the CVE ID in the package changelog (zcat /usr/share/doc/php8.3-fpm/changelog.Debian.gz | head). Distros often backport fixes without changing the upstream version number.
Is my Docker image patched automatically?
No. Pull the updated official php base image, rebuild your own image and redeploy. Images built before the release stay vulnerable.
Can PHP2Shell leak data without running code?
According to Wiz, yes: one of the four bugs lets an unauthenticated attacker read live PHP worker memory — including data from other requests, such as passwords, tokens and API keys — and it works even if the app never starts a session. Patch, and rotate secrets if the server was exposed.
How do I know if I was already hacked?
Check PHP-FPM logs for segfaults since October 17, look for new or changed .php and .user.ini files, and for shells started by the web user. If anything looks off, rebuild the server and rotate its secrets.
What changed after the patches shipped?
See PHP2Shell: what changed overnight and what to do now for exploitation reports, vendor responses and what people are saying.

Sources: PHP announcement, CERT-EU 2026-018, Sansec, watchTowr, BleepingComputer, OpenNET, Vincent Schmalbach, lilting.ch, pentestit, Gina Peter Banyard on phpc.social. Update of Oct 22: Wiz Research, PHP security release notice, Cloudflare, Tenable FAQ, BleepingComputer, CyberScoop, Help Net Security, AlmaLinux, SOCRadar.