Ehsan Bagherzadegan
Back to articles
5 min read

PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12: Critical RCE Security Release — What You Need to Do

Two critical RCE vulnerabilities (CVE-2026-109618, CVE-2026-109619) were patched in PHP on October 21. No mitigations exist — you must update to 8.2.35, 8.3.36, 8.4.27, or 8.5.12 immediately. Platform-specific steps for Laravel Cloud, Forge, Vapor, and self-managed servers.

Two critical remote code execution vulnerabilities in PHP were disclosed and patched on October 21, 2026. If you run PHP in production, this affects you directly — there are no workarounds, only updates.

The vulnerabilities, CVE-2026-109618 and CVE-2026-109619, both carry a CVSS 4.0 score of 9.2 (Critical). They allow unauthenticated remote code execution as the web worker account, and have been confirmed exploitable against both mod_php and PHP-FPM.

The Patched Versions

PHP Series Patched Version Release Date
8.2 8.2.35 2026-10-21
8.3 8.3.36 2026-10-21
8.4 8.4.27 2026-10-21
8.5 8.5.12 2026-10-21

No patches exist for PHP 8.0, 8.1, or any earlier versions. If you are still on those, you must upgrade to a supported series immediately.

What the Vulnerabilities Actually Are

CVE-2026-109618 — RCE via OOM Corruption

PHP historically used longjmp() to abort request handling when an out-of-memory (OOM) condition occurred. The problem: if the allocation failed before request memory was fully initialized, PHP left memory in an invalid state. The request shutdown procedure would then read and branch on that corrupted memory, leading to arbitrary code execution.

The fix removes longjmp() for OOM handling entirely. Instead, PHP now uses a delayed soft OOM at the next VM safe point, with a hard OOM via _exit() at a higher memory threshold. This prevents the corrupted state from ever being reached during shutdown.

CVE-2026-109619 — RCE via Stale Global State

Worker processes (like PHP-FPM workers) retain global state — error handlers, session data, object state, extension state — that can point to request-owned memory. If a fatal error (including OOM) abandons an operation before that state is reset, or if a warning repopulates state after shutdown has begun, the worker ends up with dangling pointers into freed memory. That's a use-after-free, and it's exploitable for RCE.

The fix implements a complete state reset between requests, ensuring no request-owned memory remains referenced in global state.

What You Need to Do Right Now

If You Use Laravel Cloud

Nothing. Laravel Cloud patched every running application in place on October 21. Your applications stayed online, no redeploy was needed, and they now run the patched PHP versions (8.5.12, 8.4.27, 8.3.36, or 8.2.35 depending on your configured version). New deployments automatically use the updated base images.

If You Use Laravel Forge

Go to each server in Forge and click Update PHP. Do this for every server. Because of high demand, updates may take longer than usual. If the Forge update fails, connect via SSH and follow the manual update guide. Verify with php -v over SSH.

Important: If your server runs Ubuntu 20.04 or older, you cannot update PHP through Forge. Create a new server on a supported Ubuntu version and migrate your sites. Until then, power down the old server.

If You Use Laravel Vapor

  • Native runtime on PHP 8.2+: Redeploy your applications to get the patched PHP version.
  • Custom or Docker image runtime: You need a new deployment (not just a redeploy) with an updated base image.
  • PHP 8.0 or 8.1: No patch exists. Upgrade to PHP 8.2 or later immediately.

If You Manage Your Own Servers

Update PHP through your distribution's package manager or compile from source:

# Ubuntu/Debian (ondrej/php PPA)
sudo apt update && sudo apt install php8.3=8.3.36-1+ubuntu24.04.1+deb.sury.org+1

# Alpine Linux
apk upgrade php83=8.3.36-r0

# RHEL/Fedora (Remi repository)
dnf update php83-php-8.3.36-1.el9.remi

# Verify
php -v
# Should show 8.3.36, 8.4.27, 8.5.12, or 8.2.35

If you use Docker, rebuild your images with the patched base images:

# Example: update your base image
FROM php:8.3-fpm-alpine3.20  # This now includes 8.3.36
# or explicitly pin
FROM php:8.3.36-fpm-alpine3.20

If You Run Node.js on the Same Servers

The PHP security release coincided with a Node.js security update. Update Node.js on each server as well.

Why This Matters Beyond the Immediate Patch

This release highlights something the PHP ecosystem doesn't talk about enough: the supply chain that gets security fixes from the PHP source repository to your production server is fragile and largely maintained by a small, often unpaid group of people.

The patches were under embargo until 14:00 UTC on October 21. Chainguard shipped fixed builds early, citing evidence of active exploitation. The PHP Foundation disagreed with breaking the embargo. Regardless of where you stand on that decision, the practical outcome is the same: the vulnerability details are now public, and exploit code will follow quickly.

Nuno Maduro captured the right mindset in his post on the release: build like you're already going to get hacked. Collect less data. Encrypt everything at rest and in transit. Delete old data automatically. Don't store tokens or keys unless you absolutely have to.

Checking Your Fleet

If you manage multiple servers, automate the verification:

# Quick fleet check via SSH
for host in server1 server2 server3; do
  echo "=== $host ==="
  ssh "$host" "php -v | head -1"
done

Or with Ansible:

- name: Verify PHP version
  hosts: php_servers
  tasks:
    - command: php -v
      register: php_version
      changed_when: false
    - assert:
        that:
          - "'8.3.36' in php_version.stdout or '8.4.27' in php_version.stdout or '8.5.12' in php_version.stdout or '8.2.35' in php_version.stdout"
        fail_msg: "Server {{ inventory_hostname }} is not patched: {{ php_version.stdout }}"

The Bottom Line

Two unauthenticated RCE vulnerabilities in the PHP engine itself. No mitigations. Update now.

If you're on Laravel Cloud, you're already done. If you're on Forge or Vapor, follow the platform-specific steps above. If you manage your own infrastructure, update PHP today — not next sprint, not after the holiday, today.

And while you're at it, check when you last rotated your application keys, database credentials, and API tokens. A server compromise means all of them are potentially exposed.

Sources