Skip to main content
Damascode

Engineering perspectives

Critical PHP Security Vulnerabilities in October 2026: RCE, Fixes, Mitigations and Practical Deployment Guide

Defensive remediation reference for PHP runtime, PHP-FPM and container deployments.

29 October 2026 · 22 min read

Between 21 and 26 October 2026, the PHP project published a cluster of advisories that European security and platform teams must treat as a coordinated response event, not a routine patch Tuesday. Two critical remote code execution vulnerabilities (CVE-2026-109618 and CVE-2026-109619), collectively discussed in industry reporting as PHP2Shell, affect essentially every PHP deployment that serves web requests. A separate session upload progress issue (CVE-2026-115560) requires configuration mitigation until a full fix ships in a later bugfix release. Windows PHP builds also required dependency rebuilds for the Brotli decoder flaw CVE-2026-111497. This guide summarises technical mechanisms, affected versions, patched releases, defensive mitigations, inventory and patching workflow, and monitoring guidance for CTOs, SREs, and application owners. It is written for defensive operations only.

Table of contents

  • Executive summary for leadership
  • Advisory timeline (October 2026)
  • Affected PHP versions and fixed releases
  • CVE-2026-109618: RCE via OOM corruption
  • CVE-2026-109619: RCE via stale global state
  • CVE-2026-115560: session upload progress vector
  • CVE-2026-111497: Brotli decoder (Windows builds)
  • Deployment modes and relative risk
  • Temporary mitigations (not a substitute for patching)
  • Configuration examples (php.ini, FPM, Apache)
  • Inventory and patch management
  • Detection and forensics triage
  • Application and platform hardening
  • Communication with vendors and hosting providers
  • FAQ
  • References

Executive summary for leadership

All organisations running PHP to handle HTTP traffic should assume exposure until upgraded to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35 (or vendor/LTS packages containing equivalent fixes). CVE-2026-109618 and CVE-2026-109619 are rated critical (CVSS v4.0 9.2 in PHP's pre-announcement notice) and allow unauthenticated remote code execution in realistic configurations. CISA added both CVEs to the Known Exploited Vulnerabilities catalog on 26 October 2026. Public proof-of-concept material increases likelihood of widespread scanning.

Primary action: identify every PHP runtime (including embedded copies inside appliances, panels, and legacy VMs), patch or isolate, then verify worker processes restart into fixed versions.

Secondary actions: apply documented mitigations where immediate patching is impossible, disable risky session upload progress settings, update Windows PHP -1 rebuilds for Brotli, and monitor for anomalous child processes from PHP workers.

Teams maintaining long-lived PHP products, including billing and integration platforms, should prioritise internet-facing endpoints and shared hosting patterns (Apache mod_php) first. Damascode applies these practices when operating PHP stacks for client systems and internal product engineering; this article does not imply any role in discovery of the underlying flaws.

Advisory timeline (October 2026)

Date (2026)Event
20 OctPHP security team pre-announcement of critical release
21 OctSecurity release: PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35; advisories for CVE-2026-109618 and CVE-2026-109619
23 OctInformational note on session upload progress; CVE-2026-115560 handling in regular cycle
26 OctUpdated Windows builds 8.5.12-1, 8.4.27-1, 8.3.36-1, 8.2.35-1 for Brotli 1.2.1 (CVE-2026-111497); KEV listing for PHP2Shell CVEs

Official primary sources remain PHP.net news archive 2026 and the on-site security advisory linked from the 21 October entry.

Affected PHP versions and fixed releases

BranchAffectedFixed release
PHP 8.5< 8.5.128.5.12
PHP 8.4< 8.4.278.4.27
PHP 8.3< 8.3.368.3.36
PHP 8.2< 8.2.358.2.35
PHP 8.1 and olderNo longer updated by php.netDistribution/LTS backports or upgrade

PHP 8.1 and earlier branches do not receive routine php.net maintenance. Some Linux vendors and commercial LTS providers ship backports; others require migration. PHP also published minimal source backports for 7.4, 8.0, and 8.1 to assist teams building from source without vendor support, which is a stopgap, not a long-term strategy.

Windows note: For CVE-2026-111497, use the -1 package rebuilds that bundle Brotli 1.2.1 while keeping the same PHP patch version number suffix.

CVE-2026-109618: RCE via OOM corruption

Identifiers: CVE-2026-109618, GHSA-w8hw-w9fx-j79w.

Mechanism (defensive summary): PHP uses longjmp()-style control flow when memory allocation fails (out-of-memory, OOM). Some execution contexts do not fully account for abrupt exit. Request memory can remain partially uninitialized. Later request cleanup may treat invalid data as trustworthy, leading to memory corruption and, in demonstrated cases, remote code execution.

Why operators care: Attackers can influence memory pressure through request size, upload handling, and configured limits. Industry reporting and PHP's advisory note highest concern for Apache mod_php, where an unauthenticated request may trigger the vulnerable path before application code runs. Exploitation has also been discussed in PHP-FPM contexts involving application-level code paths.

Patch: Upgrade to fixed releases listed above. Mitigations reduce specific attack paths but do not replace patching.

CVE-2026-109619: RCE via stale global state

Identifiers: CVE-2026-109619, GHSA-6wmf-4rv5-p3rp.

Mechanism (defensive summary): Fatal error handling at certain points can leave internal request-owned state referencing memory that belonged to a prior request. A subsequent request handled by the same worker process may consume stale pointers (use-after-free class behaviour) before normal reinitialization completes. Demonstrations included worker crashes and remote code execution against real-world mod_php deployments.

Operational implication: Long-lived PHP workers (FPM pools, some app servers) require process recycling after patch and careful review of opcache and worker max request settings so workers do not run indefinitely on unfixed runtimes.

Patch: Same fixed releases as CVE-2026-109618.

CVE-2026-115560: session upload progress vector

Status at publication: Full advisory promised with the next regular bugfix release; treat as active risk with configuration mitigation now.

Conditions: Exploitation requires an unusual combination:

  • session.serialize_handler set to php_binary or php_serialize in configuration
  • Application switches handler to php at runtime via ini_set() before session_start()
  • session.upload_progress.enabled remains enabled

Applications that never change serialize handler at runtime are less exposed. PHP assesses practical likelihood as low, but enterprise PHP estates rarely have perfect configuration inventory.

Mitigation: Set session.upload_progress.enabled=0 and restart all PHP workers until a fixed release is installed. This mitigation was already recommended for CVE-2026-109619 hardening on 21 October; keep it if applied.

CVE-2026-111497: Brotli decoder (Windows builds)

Scope: Out-of-bounds write in Google's Brotli library (industry nickname Brotli2Shell in third-party analysis). PHP official Windows builds that bundled vulnerable Brotli versions can reach the decoder through the cURL extension when automatic HTTP response decompression is enabled (not default, but applications may enable it).

Fix path: Install Windows packages 8.5.12-1, 8.4.27-1, 8.3.36-1, or 8.2.35-1 with Brotli 1.2.1. Linux deployments may depend on system libbrotli or the pecl/brotli extension; track those supply chains separately from the October PHP engine patches.

This CVE is distinct from PHP2Shell engine flaws but belongs in the same change window for Windows PHP operators.

Deployment modes and relative risk

PHP's advisory states all modes serving web requests are at risk: PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed, and similar.

ModeNotes for prioritisation
Apache mod_phpHighest cited risk; pre-application exploit path demonstrated for PHP2Shell
PHP-FPM behind nginx/ApacheStill critical; pool isolation and worker limits contain blast radius
php-cgi / legacy wrappersOften forgotten in inventory; patch or retire
Embedded PHP in appliancesMay lag upstream; open vendor tickets immediately
CLI-only batch jobsNot the primary web advisory target; still upgrade for defence in depth

Platform teams should map mode per hostname, not per repository language alone.

Temporary mitigations (not a substitute for patching)

PHP and national CERT bodies emphasise: only upgrading fully remediates CVE-2026-109618 and CVE-2026-109619. Where emergency patching is delayed, combine controls to reduce exposure:

For CVE-2026-109618 (OOM path)

  • Set memory_limit=-1 in a non-overridable layer (php_admin_value in FPM pool or Apache config). Verify applications cannot reintroduce finite limits via .user.ini, pool overrides, or runtime calls.
  • Set conservative post_max_size (e.g. 8M without uploads, 32M with uploads) and keep upload_max_filesize below post_max_size.
  • Enforce request size and multipart limits at reverse proxy or WAF where possible, including for requests without reliable Content-Length.
  • Use container or cgroup memory limits as availability boundaries with policies that terminate affected workers, not as a complete fix. Avoid RLIMIT_AS / RLIMIT_DATA substitutes that trigger the vulnerable allocation failure mode.

For CVE-2026-109619 and CVE-2026-115560

  • Set session.upload_progress.enabled=0 globally; restart workers.
  • Audit code for runtime ini_set('session.serialize_handler', ...) before session_start().

General containment

  • Take non-patchable public PHP 8.1-and-older systems offline until replaced, per CISA guidance tone for unsupported branches.
  • WAF rules may block known exploit patterns temporarily; do not treat WAF as sufficient alone.

Configuration examples (php.ini, FPM, Apache)

Always validate in staging; syntax varies slightly by distribution.

php.ini snippets (defensive baseline)

ini
; Disable session upload progress until CVE-2026-115560 fixed release is deployed
session.upload_progress.enabled = 0

; Reduce controllable OOM via memory_limit (CVE-2026-109618 mitigation path)
; Prefer enforcing via FPM/Apache admin directives so apps cannot override
memory_limit = -1

; Tighten POST bodies where business allows
post_max_size = 8M
upload_max_filesize = 2M

; Ensure workers recycle (good practice alongside patching)
; FPM: pm.max_requests in pool file (see below)

Adjust upload sizes if product legitimately requires larger payloads; compensate with proxy-level limits and authentication.

PHP-FPM pool (www.conf fragment)

ini
[www]
user = www-data
group = www-data
listen = /run/php/php8.3-fpm.sock

; Non-overridable mitigations
php_admin_value[memory_limit] = -1
php_admin_value[session.upload_progress.enabled] = 0
php_admin_value[post_max_size] = 8M
php_admin_value[upload_max_filesize] = 2M

; Recycle workers after patch rollout (tune to workload)
pm = dynamic
pm.max_children = 50
pm.max_requests = 500

After upgrading PHP packages, restart FPM:

bash
sudo systemctl restart php8.3-fpm
php -v
php-fpm8.3 -tt 2>/dev/null | head -5

Confirm php -v reports 8.3.36 or your branch's fixed version.

Apache with mod_php (illustrative)

apache
<Directory /var/www/html>
    php_admin_value memory_limit -1
    php_admin_value session.upload_progress.enabled 0
    php_admin_value post_max_size 8M
    php_admin_value upload_max_filesize 2M
</Directory>

Restart Apache after package upgrade:

bash
sudo systemctl restart apache2
apachectl -M | grep php

Inventory script starter (bash)

Discover CLI versions in parallel paths:

bash
#!/usr/bin/env bash
set -euo pipefail
echo "hostname,fpm_service,php_cli_version,ini_scanned_files"
for bin in /usr/bin/php /usr/local/bin/php; do
  [[ -x "$bin" ]] || continue
  ver="$("$bin" -v 2>/dev/null | head -1 || true)"
  scanned="$("$bin" --ini 2>/dev/null | awk -F: '/Loaded Configuration/{print $2}' | xargs || true)"
  echo "$(hostname -f),n/a,$ver,$scanned"
done
systemctl list-units 'php*-fpm*' --no-legend 2>/dev/null | awk '{print $1}' | while read -r unit; do
  sock="$(systemctl show "$unit" -p FragmentPath --value 2>/dev/null || true)"
  echo "$(hostname -f),$unit,$(php -v 2>/dev/null | head -1),$sock"
done

Extend with container image digests and CI base images; PHP often hides inside parent products.

Inventory and patch management

Step 1: Asset discovery

  • Configuration management databases often miss PHP; scan images, VMs, k8s pods, and PaaS runtimes.
  • Include WordPress, Drupal, Magento, Symfony, Laravel hosts, and custom monoliths.
  • Query hosting providers for managed PHP version on shared infrastructure.

Step 2: Prioritisation

  • Internet-facing production first, then staging that accepts production-like traffic.
  • mod_php and anonymous endpoints before internal-only CLI.

Step 3: Patch execution

  • Use distribution packages when available (Debian/Ubuntu Sury, RHEL Remi, etc.).
  • Rebuild custom Docker images from official base tags matching fixed versions.
  • Rolling restart FPM pools during low traffic; drain load balancers.

Step 4: Verification

  • Automated test: php -r 'echo PHP_VERSION, PHP_EOL;'
  • Integration smoke tests on upload endpoints and session-heavy flows.
  • Confirm session.upload_progress.enabled resolves to 0 in phpinfo() in production context (restricted to admins).

Step 5: Exception handling

  • Unsupported 8.1 and below: escalate to business risk acceptance or emergency replatform.
  • Vendor appliances: track third-party advisory SLAs separately.

For organisations also evaluating delivery partners, align patch SLAs with software development outsourcing contracts and IT consulting retainers for architecture reviews after emergency changes.

Detection and forensics triage

CISA and allied CERT messaging recommend monitoring for suspicious activity after patching, not only before.

Log and metric signals

  • Web server 4xx/5xx spikes on small POST bodies or malformed multipart
  • PHP-FPM worker segfaults or rapid respawn counts
  • Unexpected child processes from php-fpm or apache2 users (shell, curl to unknown hosts, base64 pipelines)
  • New web shells under upload directories or vendor/ trees
  • Outbound connections from app subnets to rare IPs post-exploit

Host indicators

  • Modified index.php, .user.ini, or autoload files
  • Cron entries or systemd units created recently
  • Setuid binaries or world-writable PHP files

Process

  • Preserve logs before rotation; snapshot volumes if incident suspected.
  • Follow organisational forensics triage requirements referenced in national alerts (e.g. CISA BOD 26-04 theming for federal contractors sets expectations for prioritised patching and triage).

Defensive teams should not execute public exploit code against production; use vendor-approved test harnesses in isolated labs if validation is required.

Application and platform hardening

Beyond October 2026 advisories, reduce PHP attack surface routinely:

  • Run PHP-FPM with dedicated pool users per site; avoid mod_php on new designs where possible.
  • Keep frameworks and Composer dependencies updated; unrelated CVEs remain common.
  • Disable unused extensions in production images.
  • Enforce CSP, secure cookies, and CSRF protections at application layer (does not fix engine RCE but limits follow-on abuse).
  • Segregate database credentials per service; assume compromise in threat models.

Teams modernising legacy PHP benefit from architecture audits before large refactors. Nearshore squads can execute remediation under your change control via nearshore software development.

Product engineering on PHP billing and workflow systems (experience includes platforms such as Faturito) reinforces strict upload validation, session hardening, and patch cadence as non-negotiable operational work.

Communication with vendors and hosting providers

Template asks for suppliers:

  • Confirm PHP engine version per environment and patch completion timestamp.
  • Confirm worker restart and FPM pool reload after patch.
  • State whether mod_php is in use on shared frontends.
  • Provide timeline for Windows -1 rebuild if applicable.
  • Document remaining exposure for embedded PHP versions outside their control.

Escalate contractual SLAs where hosting lags KEV expectations.

FAQ

Are CLI cron jobs affected by PHP2Shell?

The October critical advisory targets installations serving web requests. Upgrade all runtimes for consistency, but emergency prioritisation should focus on HTTP-facing pools.

Does setting memory_limit=-1 increase denial-of-service risk?

It removes one attacker-controlled OOM path related to CVE-2026-109618 but does not remove all allocation failures. Combine with proxy body limits, cgroup caps, and patching.

We already patched on 22 October; do we need the 26 October Windows rebuild?

If you run official PHP for Windows and use cURL with Brotli decompression, apply 8.x.y-1 rebuilds. Linux-only estates may still need libbrotli supply chain review for CVE-2026-111497.

Should we disable PHP entirely until patched?

CISA messaging for unsupported versions urges taking vulnerable internet-facing PHP offline until remediated. For supported branches, prefer rapid patch plus mitigations over prolonged outage if patch is available within change windows.

How does this interact with container immutability?

Rebuild images with fixed base packages, roll deployments, verify PHP_VERSION at container start in health checks.

Where can we get independent implementation help?

Damascode contact for defensive remediation planning, test automation around upgrades, and nearshore capacity for backlog security work. No claim is made regarding CVE discovery; follow PHP.net and national CERT primary guidance.

References

Planning a project in Portugal?

Tell us about your stack, timeline and team setup. We respond on business days.