Emergency Action Required

On October 21, 2026, the PHP Project released unscheduled emergency security updates addressing two critical vulnerabilities dubbed "php2shell". Unauthenticated network attackers can send crafted HTTP payloads to trigger memory corruption and execute arbitrary code on the underlying operating system with the privileges of the web worker (e.g., www-data, nobody, or nginx).

Immediate Recommendation: Upgrade all production PHP installations to 8.2.35, 8.3.36, 8.4.27, or 8.5.12 immediately.

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.

Vulnerability Identifier
CVE-2026-109618

Zend MM Out-Of-Memory (OOM) longjmp() Abort Memory Corruption leading to RCE.

Vulnerability Identifier
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
EMERGENCY INFRASTRUCTURE SUPPORT

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.

Plain English Guide For Website Owners, Founders & Business Managers

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

Yes. Threat intelligence feeds from AWS MadPot, GreyNoise, and independent honeypots have reported automated internet scanning looking for unpatched PHP web servers. Because no valid credentials or file write permissions are needed, remediation should be treated as an urgent P1 priority.

No. While disabling functions like 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.

IonWebs deploys automated package management with zero-downtime rolling worker restarts, containerized micro-isolation, edge Web Application Firewalls with deep packet inspection, and continuous patch verification pipelines.

Run 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.

If an immediate reboot/upgrade is prohibited, immediately edit your 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.

Do not panic, but act promptly. Contact your technical agency, internal developer, or hosting provider and request an immediate confirmation that your PHP version has been upgraded to the patched builds (8.2.35+, 8.3.36+, 8.4.27+, or 8.5.12+). If you lack an in-house team, our engineers at IonWebs can audit and patch your server safely with full backups.

Updating within your current version series (e.g. from 8.3.x to 8.3.36) contains only security and bug fixes and will not break your website. If your website is stuck on older legacy versions (PHP 7.4 or 8.0), upgrading requires testing on a staging copy first. IonWebs provides safe, zero-downtime migration to prevent breakage.

It depends on your hosting tier. Managed shared hosts will patch active versions, but often leave legacy versions unpatched. If you run a cloud instance (AWS EC2, DigitalOcean droplet, Linode) or unmanaged VPS with cPanel/Plesk, server maintenance is your responsibility and requires an explicit system upgrade command.

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.

Published by IonWebs Security Operations & Engineering
Back to News & Advisories
Advisory Quick Facts
  • Severity: Critical (9.2 CVSS)
  • Exploit Type: Unauthenticated RCE
  • Impacted Layer: Core Zend Engine
  • Disclosure Date: October 21, 2026
  • Target Users: DevOps, SecOps, Sysadmins
Priority SecOps Service
Have Vulnerable Servers?

Don't let attackers exploit php2shell. Our team can upgrade your PHP-FPM, Apache, and container environments safely with zero downtime.

  • Rapid runtime patch & verification
  • Cloudflare & WAF rule deployment
  • Legacy PHP 7.x/8.x safe migration
Fix & Upgrade My Server Chat with SecOps on WhatsApp
Need Help? Chat with us