On October 20–21, 2026, two critical unauthenticated Remote Code Execution (RCE) vulnerabilities in the PHP runtime—collectively tracked as PHP2Shell (CVE-2026-109618 and CVE-2026-109619, CVSS v4.0 9.2)—were publicly disclosed alongside emergency upstream patches (PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35).
Because both vulnerabilities reside in PHP's core request lifecycle and rfc1867 multipart upload handling rather than application-layer code, standard application-level auth checks, CSRF tokens, and routing middleware do not block exploitation. Worse, on persistent worker SAPIs like Apache mod_php, exploitation can trigger before a single line of userland PHP executes.
To give infrastructure, SecOps, and enterprise IT teams an immediate, deterministic way to audit exposure and deploy temporary hardening while patch windows are scheduled, Aria Technology Group (AriaWave) open-sourced the AriaWave PHP2Shell Readiness & Mitigation Scanner (ariawave-php2shell-scanner).
1. Anatomy of PHP2Shell: Why CVE-2026-109618 and CVE-2026-109619 Are Different
Most PHP vulnerabilities live in framework dependencies or unsafe userland primitives (unserialize, eval, template injection). PHP2Shell operates below userland in the C runtime's request startup, multipart upload parsing (main/rfc1867.c), and request shutdown/cleanup paths:
CVE-2026-109618 — Out-of-Memory (OOM) Request Cleanup Corruption (CVSS 9.2)
- Mechanism: When a PHP worker process hits an Out-of-Memory (OOM) condition during multipart upload or request processing, an uninitialized/corrupted pointer state during request cleanup can be leveraged for arbitrary code execution.
-
The Apache
RLimitMEMAmplifier: Environments that enforce OS-level address-space ceilings via Apache'sRLimitMEM(RLIMIT_AS/RLIMIT_DATA) or allow largepost_max_sizepayloads make it trivial for an unauthenticated remote attacker to force the worker into the vulnerable OOM cleanup path. -
Pre-Script Execution on
mod_php: Under Apachemod_php, multipart form parsing and memory allocation occur before the target.phpscript is invoked.
CVE-2026-109619 — Use-After-Free via Stale session.upload_progress State (CVSS 9.2)
-
Mechanism: When
session.upload_progress.enabledis active (the upstream default in most distributions), an interrupted or crafted multipart upload can leave stale request-owned pointers in global state (rfc1867upload progress tracking). -
Worker Reuse Exploitation: On any persistent worker SAPI (
mod_php,php-fpm, FrankenPHP, LiteSpeed), the next request handled by that same worker process can trigger a Use-After-Free (UAF) against the dangling upload progress structure.
2. Patched PHP Release Matrix (Published October 21, 2026)
If your fleet runs any version below the fixed release threshold for its branch, treat it as exposed:
-
PHP 8.5:
8.5.0 – 8.5.11vulnerable → Upgrade to8.5.12+ -
PHP 8.4:
8.4.0 – 8.4.26vulnerable → Upgrade to8.4.27+ -
PHP 8.3:
8.3.0 – 8.3.35vulnerable → Upgrade to8.3.36+ -
PHP 8.2:
8.2.0 – 8.2.34vulnerable → Upgrade to8.2.35+ -
PHP <= 8.1 (
8.1.x,8.0.x,7.4.x): End-of-Life upstream — requires verified OS vendor/LTS security backports (Debian/Ubuntu/RHEL/CloudLinux/cPanel EasyApache 4).
3. Hidden Configuration Traps That Silently Undo Global Mitigations
During incident response across multi-tenant servers, containerized microservices, and cPanel/EasyApache 4 fleets, simply dropping a setting into /etc/php.ini often fails for three reasons:
-
Lexicographical
php.dLoad Order: An earlier.inifile inconf.d/orphp.d/can be overridden by a later file loaded alphabetically after it. -
Per-Directory
.htaccess&.user.iniOverrides: A singlephp_flag session.upload_progress.enabled Onorphp_value post_max_size 256Minside a tenant's.htaccessor.user.inire-opens the attack surface on that route. -
PHP 8.5
fatal_error_backtracesInformation Leak: On PHP 8.5 runtimes, leavingfatal_error_backtraces = Onduring OOM/crash probing leaks heap and call-frame telemetry back to the caller.
4. Automated Auditing with ariawave-php2shell-scanner
We built ariawave-php2shell-scanner as a single-file, zero-dependency Python 3.10+ CLI tool and autonomous agent skill (SKILL.md) so defenders can run it immediately on air-gapped production hosts, CI/CD runners, and container images without installing third-party packages.
Strictly Defensive by Design: The scanner performs zero active exploitation and sends no malicious payloads. It inspects local runtimes, Dockerfiles, Apache/FPM/INI trees, and (optionally) passive HTTP response headers on authorized endpoints.
Quickstart Commands
# Clone the zero-dependency scanner
git clone https://github.com/AIjennings/ariawave-php2shell-scanner.git
cd ariawave-php2shell-scanner
# 1. Run the built-in 7-check deterministic self-test suite
python scripts/php2shell_scanner.py --selftest
# 2. Audit a specific PHP version string
python scripts/php2shell_scanner.py --version "8.4.26"
# 3. Scan an entire server config tree (/etc/php, /etc/apache2, /var/www) or repo
python scripts/php2shell_scanner.py --scan-dir /etc/php
# 4. Generate the lexicographically-last temporary php.d drop-in mitigation
python scripts/php2shell_scanner.py --emit-dropin --post-max 32M > /etc/php.d/zzzzzzzz-cve-2026-109618-109619.ini
5. Immediate Defense-in-Depth Playbook (While Scheduling Patch Windows)
Until every runtime is upgraded to 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35 and all worker pools are restarted, apply these four mitigations immediately:
-
Deploy the
zzzzzzzz-cve-2026-109618-109619.iniDrop-In: Prefixing withzzzzzzzz-guarantees the hardening rules load last inphp.d/:
; Temporary mitigation for CVE-2026-109618 & CVE-2026-109619 (PHP2Shell)
; Generated by AriaWave PHP2Shell Readiness Scanner (https://ariawave.tech)
session.upload_progress.enabled = 0
post_max_size = 32M
upload_max_filesize = 32M
fatal_error_backtraces = 0
-
Eliminate Apache
RLimitMEM: RemoveRLimitMEMdirectives from Apache virtual hosts and global configs so OS-levelRLIMIT_AS/RLIMIT_DATAconstraints do not force PHP workers into the vulnerable OOM cleanup code path. -
Migrate Off
mod_php: Transition legacy Apachemod_php(LoadModule php_module) deployments to isolatedphp-fpmworker pools with boundedpm.max_requests. - Enforce Edge WAF Request Body Limits: Cap multipart request body sizes at your reverse proxy, SASE edge, or cloud WAF before traffic reaches origin PHP workers.
Resources & Official Advisories
-
Open-Source Scanner & Agent Skill (
MIT): github.com/AIjennings/ariawave-php2shell-scanner -
Autonomous Agent Blueprints (
SKILL.md): github.com/AIjennings/aria-agent-blueprints - PHP.net Security Advisory (Oct 21, 2026): php.net/archive/2026.php#2026-10-21-5
- NCSC-NL PHP2Shell Guidance: github.com/NCSC-NL/php2shell
- CERT-EU Security Advisory 2026-018: cert.europa.eu/publications/security-advisories/2026-018
Authored by **Andrew Jennings* — Founder & Principal Systems Engineer at Aria Technology Group (AriaWave) (andrew@aria.net) and Senior Technology Advisor at Utel USA (ajennings@utelusa.com · 313-232-0138). Need an enterprise SASE/WAF edge audit, multi-carrier redundancy review, or autonomous security toolchain deployment? Connect on LinkedIn or visit ariawave.tech.*
Top comments (0)