1. Threat Overview & Timeline
Over 75% of websites with known server-side programming languages run on PHP. On October 21, 2026, security researchers coordinated with the PHP Core Team to disclose two profound architectural flaws residing directly within the Zend Memory Management (Zend MM) and global request lifecycle layers.
Telemetry collected by global threat intelligence sensors (including AWS MadPot and honeypot fleets) recorded weaponized proof-of-concept scanning within 36 hours of publication. The attack requires no prior authentication, no uploaded executable files (like .php backdoors), and succeeds even on default, hardened web configurations.
CVE-2026-109618
Zend MM Out-Of-Memory (OOM) longjmp() Abort Memory Corruption leading to RCE.
CVE-2026-109619
Global Request Pointer Stale Reference / Use-After-Free (UAF) in error & upload contexts.
2. Deep Technical Root Cause Analysis
CVE-2026-109618: Out-Of-Memory Abortion via longjmp()
In standard execution, PHP processes requests inside the Zend Engine with pre-configured memory constraints (memory_limit). When an execution pathway requests memory beyond this ceiling, PHP invokes internal memory handlers that issue a C runtime longjmp() call.
The issue stems from complex allocation routines—specifically during nested multipart parsing and large string concatenations. If an out-of-memory error triggers midway through a multi-step heap allocation:
- The abrupt
longjmp()skips the remaining initialization instructions for adjacent pointers. - The Zend garbage collector and request teardown logic (
shutdown_memory_manager) assume the memory blocks conform to valid structures. - When the web server worker (e.g., PHP-FPM or Apache worker) is kept alive to service subsequent requests, attackers can leverage this uninitialized chunk to overwrite function pointers and pivot into arbitrary code execution.
CVE-2026-109619: Stale Global State & Use-After-Free (UAF)
PHP retains several global internal states that briefly reference request-bound structures to maintain high throughput. A prominent example is the Session Upload Progress tracking mechanism (session.upload_progress.enabled).
When a client submits an upload progress form that triggers an unhandled fatal error or connection reset, the cleanup handlers free the request-bound memory pool but fail to clear the global pointer table. Consequently:
- The global pointer continues to point to freed heap memory.
- A following request allocated on the same PHP-FPM worker thread re-allocates that exact memory block with attacker-controlled user input.
- A Use-After-Free condition is achieved, enabling unauthorized memory read/write primitives and shell execution.
3. Official Patch Matrix
The PHP development team released the following patch versions on October 21, 2026. Verify your running PHP version and upgrade immediately to match or exceed the patched versions below:
| PHP Branch | Vulnerable Builds | Patched Release | Remediation Status |
|---|---|---|---|
| PHP 8.5 | 8.5.0 – 8.5.11 | 8.5.12 | Official Patch Available |
| PHP 8.4 | 8.4.0 – 8.4.26 | 8.4.27 | Official Patch Available |
| PHP 8.3 | 8.3.0 – 8.3.35 | 8.3.36 | Official Patch Available |
| PHP 8.2 | 8.2.0 – 8.2.34 | 8.2.35 | Official Patch Available |
| PHP 8.1 & Earlier (EOL) | 5.4.x – 8.1.x (All) | None (EOL) | Immediate Upgrade or Vendor Backport Required |
4. Step-by-Step Remediation Guide
A. Debian / Ubuntu Server (Ondřej Surý PPA or Default Repositories)
# Update package repositories
sudo apt-get update
# Upgrade PHP runtime and common modules
sudo apt-get --only-upgrade install php8.2 php8.2-fpm php8.2-cli \
php8.3 php8.3-fpm php8.3-cli php8.4 php8.4-fpm php8.4-cli
# Restart PHP-FPM and Web Server
sudo systemctl restart php8.3-fpm
sudo systemctl restart nginx # or apache2
# Verify active version
php -v
B. RHEL / Rocky Linux / AlmaLinux (Remi's RPM Repository)
# Clean metadata and update packages
sudo dnf clean all
sudo dnf upgrade php php-cli php-fpm
# Restart service
sudo systemctl restart php-fpm
sudo systemctl restart httpd
C. Docker Containers & Kubernetes Deployments
Rebuild all container images pulling from updated base images (e.g., php:8.3.36-fpm-alpine or php:8.4.27-fpm). Rolling restarts of pods will flush out vulnerable in-memory workers.
# Example Dockerfile fix
FROM php:8.3.36-fpm-bookworm
# Ensure package security updates run during build
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
5. Emergency Compensating Controls (If Upgrade is Delayed)
If you are in an enterprise freeze window or managing legacy code that cannot be updated immediately, apply these defensive controls to disrupt known exploit chains:
1. Disable Session Upload Progress in php.ini
CVE-2026-109619 heavily relies on upload progress hooks to populate and manipulate the global pointer table. Disabling this eliminates the primary vector:
session.upload_progress.enabled = Off
2. Cloudflare / Reverse Proxy WAF Rule
Block suspicious multi-layered multipart boundaries and excessive header counts designed to trigger heap segmentation:
(http.request.method eq "POST" and http.request.body.mime_type contains "multipart/form-data" and any(http.request.headers.values[*] contains "multipart/form-data; boundary="))
3. Configure PHP-FPM Request Recycling
In /etc/php/X.X/fpm/pool.d/www.conf, reduce pm.max_requests to periodically kill and respawn workers. While not an exploit prevention, it prevents stale global pointers from persisting across long worker lifetimes:
pm.max_requests = 200
Need Help Upgrading or Securing Your PHP Servers?
IonWebs sysadmins and DevOps engineers provide immediate assistance: emergency PHP runtime upgrades, zero-downtime rolling deployments, custom WAF firewall rules, and legacy code audit to prevent exploitation without service disruption.
Not a Developer? What "php2shell" Means for Your Business
If you run a business website, online store (WooCommerce/Magento), or customer portal, chances are it is built on PHP. Here is what you need to know in plain English:
What is the danger?
Hackers can remotely send special requests to take control of your web server without needing any login username or password.
Does your host fix it?
If you have a dedicated VPS, cloud server (AWS/DigitalOcean), or use an older PHP version (7.x / 8.0), it will NOT fix itself automatically.
What should you do?
Ask your developer or agency: "Have all our server PHP packages been updated to the October 21, 2026 security release?"
6. Frequently Asked Questions
system() or shell_exec() is sound general security practice, php2shell corrupts internal memory at the C runtime / Zend Engine level. Attackers overwrite return addresses or function pointers directly in memory, bypassing PHP-level function restrictions.
php -v from the terminal. If your active PHP runtime build matches any version below 8.2.35, 8.3.36, 8.4.27, or 8.5.12, your server is vulnerable to php2shell. For containerized clusters, check your base image digest (e.g. php:8.3-fpm-alpine) and ensure image rebuilds pulled upstream patches released after October 21, 2026.
php.ini to set session.upload_progress.enabled = Off and restart PHP-FPM. Additionally, deploy an edge WAF expression to inspect incoming POST requests containing multipart boundaries with abnormal payload lengths or nested boundaries.
When CWP compiles PHP with the AVIF image library on CentOS Stream 9 or AlmaLinux 9, it builds libavif.so.15 into /usr/local/lib64/. However, the system's dynamic linker (ldconfig) by default only scans /usr/lib64/, causing Apache to return "500 End of script output before headers: index.php".
Immediate Fix: Register the custom library path and create the compatibility symlink via root SSH:
ln -sf /usr/local/lib64/libavif.so.15 /usr/lib64/libavif.so.15
echo "/usr/local/lib64" > /etc/ld.so.conf.d/usr-local-lib64.conf
ldconfig
systemctl restart httpd
Test with /usr/local/bin/php-cgi -v to confirm the binary executes cleanly.