DevOps 4 min read

Critical PHP Remote Code Execution Flaws: Analysis of Security Advisory 2026-018 (CVE-2026-109618 & CVE-2026-109619)

A technical breakdown of the critical PHP security vulnerabilities announced in October 2026 (Security Advisory 2026-018). Learn about the unauthenticated Remote Code Execution flaws (CVE-2026-109618 and CVE-2026-109619) with CVSS 9.2, their root causes in out-of-memory handling and stale global state, affected runtime environments, and immediate hardening mitigations.

On October 21, 2026, the PHP core development team alongside CERT-EU published Security Advisory 2026-018, addressing two critical remote code execution (RCE) vulnerabilities in PHP core.

Assigned CVSS v3.1 scores of 9.2, these vulnerabilities allow unauthenticated attackers to achieve arbitrary code execution prior to the execution of any userland application code. Initial proofs-of-concept (PoCs) are already circulating publicly, and threat actors are actively scanning for unpatched installations.

Here is an architectural breakdown of both vulnerabilities, the affected SAPIs, immediate hardening mitigations, and the official remediation steps.


At a Glance: Vulnerability Summary

CVE Identifier GHSA Reference CVSS Score Vulnerability Class Impact
CVE-2026-109618 GHSA-w8hw-w9fx-j79w 9.2 (Critical) Memory Corruption via OOM Unauthenticated Remote Code Execution
CVE-2026-109619 GHSA-6wmf-4rv5-p3rp 9.2 (Critical) Stale Global State Reuse Unauthenticated Remote Code Execution

Deep Dive: Technical Root Causes

1. CVE-2026-109618: OOM Memory Corruption During Request Ingestion

PHP enforces its configurable memory_limit directive by invoking longjmp() whenever an allocation pushes total usage beyond the configured boundary. This triggers an immediate abort mechanism intended to safeguard server resources.

However, invoking longjmp() during the early stages of request lifecycle handling—most notably during the parsing of multi-part form-based file uploads—interrupts internal data structure initialization mid-flight.

When PHP’s shutdown and cleanup sequence executes:

  • The internal request-bound structures are partially initialized.
  • The destructor logic mistakenly treats incomplete structures as valid pointers.
  • PHP attempts to free memory regions that were never initialized.
  • Because memory allocators frequently recycle previously written buffers, the deallocated pointers can point directly to attacker-controlled payload data from earlier allocations, leading to arbitrary heap corruption and code execution.

2. CVE-2026-109619: Stale Global State Across Worker Cycles

In persistent worker pools (such as PHP-FPM, FrankenPHP, and LiteSpeed), worker processes handle sequential HTTP requests across their lifecycle.

Under specific failure conditions (such as unhandled fatal errors or execution timeouts during initialization):

  • Memory allocated for request-specific internal state is released back to the allocator.
  • Pointers inside global structures referencing this request-bound memory fail to be properly zeroed out or reset prior to accepting the next request.
  • When the worker receives a subsequent incoming request, internal PHP engine routines read the stale, freed memory before standard request initialization cleans it up.
  • Attackers sending paired requests can deliberately prime the worker's heap with shellcode or ROP chains, then immediately trigger execution on the succeeding request.

Affected Environments & SAPI Risk Matrix

Virtually all PHP deployments serving web traffic are vulnerable:

  • Apache (mod_php): Highest Risk. Shares process memory directly with Apache worker threads; easiest vector for reliable exploitation.
  • PHP-FPM: High Risk. Default for Nginx/Caddy; worker recycling facilitates stale global state attacks.
  • FrankenPHP & LiteSpeed: High Risk. High-concurrency worker models are directly exposed.
  • CLI / Batch Jobs: Lower risk for direct external exploitation, but vulnerable if ingesting untrusted external input with strict memory caps.

Affected Versions

  • PHP 8.5 < 8.5.12
  • PHP 8.4 < 8.4.27
  • PHP 8.3 < 8.3.36
  • PHP 8.2 < 8.2.35
  • End-of-Life Versions: PHP 8.1, 8.0, 7.4 and earlier (no upstream security support).

Recommended Action: Upgrading Immediately

The PHP project released official security fixes on October 21, 2026 at 13:30 UTC. Upgrade to the latest patch release immediately:

# Ubuntu / Debian with Ondrej Sury PPA
sudo apt-get update
sudo apt-get install --only-upgrade php8.4 php8.4-fpm php8.4-cli

# Verify version
php -v

Note for EOL Branches: If you run PHP 8.1 or PHP 7.4 in legacy infrastructure without commercial LTS support (such as Ubuntu ESM or Red Hat ELS), minimal backport patches have been published by the PHP security team for source builds.


Emergency Temporary Mitigations

If immediate binary upgrades cannot be applied right now, implement the following configuration hardening to sever known exploitation paths.

Warning: Mitigations reduce exposure against current public PoCs, but only a full binary update provides comprehensive protection.

Mitigating CVE-2026-109618 (OOM Corruption)

  1. Remove user-controllable memory limit exceptions by setting memory_limit = -1 in the master FPM pool configuration (so longjmp() is not triggered by user payloads), while relying on container/cgroup hard limits for resource bounding:
    ; /etc/php/8.4/fpm/pool.d/www.conf
    php_admin_value[memory_limit] = -1
    php_admin_value[post_max_size] = 16M
    php_admin_value[upload_max_filesize] = 12M
    
  2. Constrain request boundaries at your reverse proxy (Nginx/Cloudflare):
    # Restrict client request buffer sizes in nginx.conf
    client_max_body_size 16M;
    client_body_buffer_size 128k;
    large_client_header_buffers 4 16k;
    

Mitigating CVE-2026-109619 (Stale Global State)

  1. Disable session upload progress:
    ; php.ini or pool configuration
    session.upload_progress.enabled = 0
    
  2. On PHP 8.5, disable fatal error backtraces:
    fatal_error_backtraces = 0
    
  3. Restart all PHP-FPM workers immediately after saving changes:
    sudo systemctl restart php8.4-fpm
    

Official References & Security Advisories