Critical PHP CVE-2026-109618/109619 Patching Guide: Versions, Commands & Verification
This guide details patching two critical PHP vulnerabilities (CVE-2026-109618/109619) across Ubuntu, Debian, RHEL, Docker, and embedded PHP runtimes, providing package status tables, upgrade commands, service restart procedures, and mitigation rollback steps.
Current Status (as of 13:45 UTC)
PHP officially released fixed versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 around 13:35 UTC, ahead of the planned 14:00 UTC schedule. Distribution packages are rolling out; this article is continuously updated as packages become available.
The guide demonstrates how to install patches on Ubuntu, Debian, and Red Hat, which services to restart, and how to verify the fix is running. Before patches arrive: identify your PHP source, keep early mitigations in place, and roll back mitigations only after the patch is confirmed running.
Live Updates
Key updates from October 21, 2026 (UTC):
21:22 : Ondřej's PPA now provides all four branches on arm64; Alpine edge provides fixes on aarch64.
20:47 : Alpine edge x86_64 includes fixes; aarch64 still building.
20:09 : Alpine 3.24 provides fixes for 8.3, 8.4, 8.5; older Alpine releases will not receive fixes. Laravel Herd includes fixes for all four versions.
19:50 : Added software with embedded PHP (FrankenPHP, Bref, Heroku, Plesk, MAMP, Laragon, NativePHP); some not yet patched.
19:20 : Remi repository provides fixes for RHEL 8, 9, 10 across 8.2–8.5.
18:46 : Ondřej's PPA provides amd64 fixes and arm64 for 8.2/8.3; packages.sury.org mirrors amd64 builds.
18:10 : Homebrew 8.5.12 available.
17:40 : All official Docker images fixed; Homebrew 8.2.35 available.
17:10 : Official Docker images for amd64 and arm64 (except 8.2) released; Homebrew 8.3.36 and 8.4.27 available.
16:40 : First official Docker image with fix (php:8.2.35-fpm, amd64); Ubuntu Pro fixes for older releases in USN-8948-2.
16:13 : Debian 12 fix announced (DLA-4848-1) but not yet installable via apt.
15:38 : Zend confirms commercial LTS builds for PHP 7.2–8.1 are patched.
15:25 : Fix for PHP 7.4, 8.0, 8.1 is a minimal mitigation patch that disables session upload progress entirely regardless of php.ini.
14:55 : Details on new hard memory limit default behavior added.
14:50 : Ubuntu fixes installable via apt on amd64; earlier Launchpad workaround removed.
14:40 : Package status split by architecture; Ubuntu arm64 packages ready, amd64 syncing.
14:15 : Ubuntu USN-8948-1 published but packages not yet detectable; Debian 12 building.
13:55 : Researchers publish php2shell.com; vulnerabilities also leak memory; patched PHP introduces hard memory limit.
13:50 : Fix packages live on packages.sury.org (amd64), Debian 13 security archive (php8.4), Ubuntu 24.04 Launchpad.
13:45 : PHP official releases 8.5.12, 8.4.27, 8.3.36, 8.2.35 with two security advisories.
13:10 : Ubuntu marks CVEs as Critical; no fixes yet.
12:30 : Ondřej Surý confirms all supported Debian/Ubuntu versions will get fixes; amd64 first, arm later.
11:30 : CloudLinux preparing alt-php fixes.
11:11 : Composer co-founder Nils Adermann confirms Ondřej's PPA will get fixes.
10:40 : Earlier rumor Remi would not release today (later disproven).
10:25 : Article published ahead of official patch for ops preparation.
Package Status
1. Sources Using Official PHP Version Numbers
Fixed versions per branch: 8.2.35, 8.3.36, 8.4.27, 8.5.12. Status legend: ✔ = fixed; version number = vulnerable; — = branch not offered; ? = undetectable.
packages.sury.org (amd64) – Debian 12,13; Ubuntu 22.04,24.04: ✔ for all four branches.
packages.sury.org (arm64) – same distros: 8.2.34, 8.3.35, 8.4.26, 8.5.11 (vulnerable).
ppa:ondrej/php (amd64) – Ubuntu 22.04,24.04: ✔ all branches.
ppa:ondrej/php (arm64) – Ubuntu 22.04,24.04: ✔ all branches.
Docker php official (amd64) – Debian base: ✔ all branches.
Docker php official (arm64) – Debian base: ✔ all branches.
Homebrew – macOS: ✔ all branches.
windows.php.net – Windows official builds: ✔ all branches.
Arch Linux extra – 8.2: —; 8.3: ✔; 8.4: —; 8.5: ✔.
Alpine 3.24 (x86_64) – 8.2: —; 8.3: ✔; 8.4: ✔; 8.5: ✔.
Alpine 3.24 (aarch64) – 8.2: —; 8.3: ✔; 8.4: ✔; 8.5: ✔.
Alpine edge (x86_64) – 8.2: —; 8.3: ✔; 8.4: ✔; 8.5: ✔.
Alpine edge (aarch64) – 8.2: —; 8.3: ✔; 8.4: ✔; 8.5: ✔.
Gentoo – ✔ all branches.
Remi (x86_64) – RHEL 8,9,10: ✔ all branches.
Remi (aarch64) – RHEL 8,9,10: ✔ all branches.
php.net source – ✔ all branches.
2. Distribution Native Packages (Backported)
Ubuntu and Debian backport fixes to their shipped PHP versions; package version numbers differ from upstream.
Ubuntu 22.04 (php8.1) : 8.1.2-1ubuntu2.28 ✔ amd64/arm64.
Ubuntu 24.04 (php8.3) : 8.3.6-0ubuntu0.24.04.13 ✔ amd64/arm64.
Ubuntu 26.04 (php8.5) : 8.5.4-0ubuntu1.5 ✔ amd64/arm64.
Debian 12 (php8.2) : 8.2.35-1~deb12u1 ✔ amd64/arm64.
Debian 13 (php8.4) : 8.4.27-1~deb13u1 ✔ amd64/arm64.
3. PHP Embedded in Other Software
These bundles ship their own PHP; system package managers won't update them. Upgrade the software itself.
FrankenPHP v1.13.2 : ✔ 8.2, 8.3, 8.4, 8.5.
swoole-cli v6.2.2.2 : 8.4.25 (unpatched) for 8.4 only.
Bref (AWS Lambda layers) : ✔ 8.2, 8.3, 8.4, 8.5.
Heroku (heroku-24 buildpack) : ✔ 8.2, 8.3, 8.4, 8.5.
Plesk (plesk-php packages) : ✔ 8.2, 8.3, 8.4, 8.5.
cPanel EasyApache 4 : source patched; download server unverified (?).
CloudLinux alt-php : stable repo not public; undetectable (?).
Laravel Herd : ✔ all branches (confirmed by developer Marcel Pociot).
ServBay v1 (macOS/Windows) : ✔ all branches.
ServBay v2 (macOS) : 8.2.30, 8.3.30, 8.4.18, 8.5.3 (unpatched).
MAMP (macOS, 2026-10-01) : 8.3.28, 8.4.15, 8.5.0 (unpatched).
Laragon (Windows, 8.7.0) : 8.3.33 (unpatched).
XAMPP (Windows, last 2023-11) : 8.2.12 (unpatched).
static-php-cli (dl.static-php.dev) : 8.2.32, 8.3.32, 8.4.23, 8.5.8 (unpatched).
NativePHP (NativePHP/php-bin) : 8.3.31, 8.4.21, 8.5.6 (unpatched).
Package Notes
Docker : Official php:8.x.y images fixed on amd64/arm64. Pull new tags, rebuild with docker build --pull, recreate containers. Chainguard images fixed since 07:41 UTC. Note: 8.5.12RC1 and 8.4.27RC1 images do NOT contain fixes.
Debian tracking : Debian 13 fix DSA-6574-1; Debian 12 fix DLA-4848-1.
Launchpad PPA users : packages.sury.org has amd64 builds; separate apt source with own URL and key. See Ondřej's README for config.
Release tags : GitHub tags php-8.x.y point to signed commits off main branches; signatures verified by GitHub.
Minimal Upgrade Steps
Identify PHP source (distro, third-party repo, Docker, FrankenPHP, etc.).
Install fixed PHP from same source once released.
Restart every process running PHP.
Verify no process still runs old PHP.
Roll back unneeded early mitigations.
Which PHP Versions Get Fixed?
All versions below the fixed ones are affected (GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp). Only currently supported branches receive official updates:
8.5 : 8.5.12 (security support until 2029-12-31)
8.4 : 8.4.27 (until 2028-12-31)
8.3 : 8.3.36 (until 2027-12-31)
8.2 : 8.2.35 (until 2026-12-31)
8.1 and earlier : No official new releases (EOL). PHP released source patches for 7.4, 8.0, 8.1.
Distributions may backport to older versions. Ubuntu, Debian, Red Hat do so for some releases. Ubuntu marked CVEs Critical on Oct 21; fixes pending. Distribution trackers: Ubuntu CVE-2026-109618/109619, Debian CVE-2026-109618/109619, Red Hat CVE-2026-109618/109619.
Source patches for 7.4, 8.0, 8.1 : Minimal mitigation patches; they completely disable session upload progress regardless of php.ini. If your app relies on upload progress bars, they will break. Ondřej's packages.sury.org PHP 7.4 package uses this patch. Zend commercial LTS builds (7.2, 7.3, 7.4, 8.1) include fixes.
Vulnerability Details
PHP released technical details with the new versions. In short:
CVE-2026-109618 (GHSA-w8hw-w9fx-j79w) – “OOM Data Corruption to RCE”: When PHP hits Out-of-Memory, it may bail out mid-request setup. Cleanup code trusts data that was never fully initialized. Confirmed trigger: multipart request parsing.
CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp) – “Stale Global State to RCE”: Some request state persists after memory free. Subsequent requests handled by same PHP worker can reuse that state. Confirmed triggers: session upload progress tracking, and fatal_error_backtraces setting in PHP 8.5.
Threat scope per PHP : All web-serving PHP environments – PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed.
mod_php highest risk : Single anonymous request can trigger attack before any application code runs.
PHP-FPM : Confirmed RCE via upload progress when app triggers fatal error at specific moment. For OOM, no full exploit chain demonstrated yet, but code review confirms FPM affected.
Research team (Wiz, OpenAI, Calif) additions via php2shell.com and whitepaper:
Silent memory leak : Both vulnerabilities can leak memory without executing code. Attacker reads portions of PHP worker memory, potentially exposing secrets from other requests (passwords, tokens, API keys, certificates). Proven effective against any PHP application.
Reported to PHP on 2026-08-24. Demonstrated RCE against WordPress, Drupal, Joomla. Even a simple “Hello World” script on vulnerable PHP is exploitable.
Note: Wiz blog table places upload progress under CVE-2026-109618; PHP official and php2shell.com place it under CVE-2026-109619. This guide follows PHP official classification. Both CVEs fixed by same update, so no operational impact.
Core fix commit : 31c0ea7d7f (“Avoid state corruption via bailout”). On OOM, PHP no longer bails out immediately; it stops request at safe point and fully resets leftover state before next request.
Post-Upgrade: Hard Memory Limit Introduced
The fix adds a second, higher memory limit. When a process hits this limit, PHP immediately aborts the process and shutdown functions do not run (per php2shell.com and GHSA-w8hw-w9fx-j79w). If you set memory_limit = -1 as a temporary mitigation, you must revert to a real limit after patching.
New setting : memory_hard_limit_percent.
Default behavior :
Process exit : Processes hitting hard limit exit with status 137 (exit code 137). Watch PHP-FPM logs for this code. Verified in PHP 8.5.12 source (Zend/zend_alloc.c).
Core developer advice (Alexandre Daubois): Patched PHP still aborts OOM workers, but without memory corruption. For upload-heavy apps, limit multipart chunk count and per-chunk header count at the web server layer.
Running PHP 8.1 or Older? Plan Migration to 8.4 or 8.5
Distro backports fix this one vulnerability but won't protect against the next. PHP upstream no longer reviews/fixes those branches. Apply today's fix, then migrate to 8.4 or 8.5 ASAP. PHP 8.2 security support ends 2026-12-31; skip it. On Ubuntu, easiest path is distro upgrade: 24.04 ships 8.3, 26.04 ships 8.5.
If your distro doesn't patch your PHP version :
Keep all early mitigations.
Migrate to supported PHP as fast as possible.
Taking the site offline is the only safe option until migration completes.
What PHP Version Does Your Distro Ship?
Verified in containers on 2026-10-21:
Ubuntu 26.04/26.10 : 8.5 – Ubuntu free updates.
Ubuntu 24.04 : 8.3 – Ubuntu free updates.
Ubuntu 22.04 : 8.1 – Ubuntu free updates only if Canonical backports.
Ubuntu 20.04/18.04 : 7.4/7.2 – Ubuntu Pro (ESM Infra). Fixed in 7.4.3-4ubuntu2.29+esm5 and 7.2.24-0ubuntu0.18.04.17+esm14 (USN-8948-2).
Ubuntu 25.04/25.10 : 8.4 – Unmaintained; interim releases EOL.
Debian 13 trixie : 8.4 – Debian Security Team (DSA).
Debian 12 bookworm : 8.2 – Debian LTS Team (DLA).
Debian 11 bullseye : 7.4 – Only Freexian paid ELTS (Debian LTS ended 2026-08-31).
RHEL 10 : 8.3, 8.4 – Red Hat official.
RHEL 9 : 8.0 (default), 8.2, 8.3 (module streams) – Red Hat (8.0 only if backported).
RHEL 8 : 7.4, 8.2 (module streams) – Red Hat (7.4 only if backported).
Distro Gotchas
RHEL 8 default trap : dnf install php installs PHP 7.2! That module stream is still default but retired since 2021, no fixes. Same for 7.3 and 8.0 on RHEL 8, and 8.1 on RHEL 9.
Package version vs PHP version : Ubuntu/Red Hat backport fixes into original version string. Ubuntu 24.04 still shows 8.3.6; package version changes, not internal PHP version. Check package version, not php -v.
Debian ships upstream point releases : bookworm upgrades to new 8.2.x; trixie to new 8.4.x.
Common Third-Party Repos
Ubuntu 22.04/24.04: Ondřej Surý's ppa:ondrej/php.
Ubuntu 26.04, Debian 11/12/13: Ondřej's packages.sury.org (PPA migrating there).
RHEL/AlmaLinux/Rocky 8,9,10: Remi repository.
Remi eventually published fixes despite earlier PHP Foundation notice. Remi's servers list 8.2.35, 8.3.36, 8.4.27, 8.5.12 for x86_64 and aarch64 on RHEL 8,9,10. Some mirrors may lag; run sudo dnf clean metadata if updates not shown.
Ondřej confirms: all PHP versions in his repos (including discontinued branches) get fixes; all supported Debian/Ubuntu distros updated; amd64 builds first, arm follows; CloudLinux preparing alt-php; Remi still maintaining 7.4, 8.0, 8.1 patches but no absolute promise.
Upgrade Commands
1. Ubuntu & Debian
Same steps for Ubuntu native, Debian native, Ondřej PPA, and packages.sury.org. Replace 8.3 with your PHP version.
# View installed PHP packages and versions
dpkg -l 'php*' | awk '/^ii/{print $2, $3}'
# Example output:
php-common 2:93ubuntu2
php8.3-cli 8.3.6-0ubuntu0.24.04.12
php8.3-common 8.3.6-0ubuntu0.24.04.12
php8.3-fpm 8.3.6-0ubuntu0.24.04.12
php8.3-opcache 8.3.6-0ubuntu0.24.04.12
php8.3-readline 8.3.6-0ubuntu0.24.04.12
# Fetch latest package list and see pending PHP updates
sudo apt-get update
apt list --upgradable 2>/dev/null | grep php
# Upgrade only PHP packages (keep single quotes to prevent shell glob expansion)
sudo apt-get install --only-upgrade 'php8.3*' libapache2-mod-php8.3Note: libapache2-mod-php8.3 is for Apache mod_php; apt skips if not installed. Run once per PHP version on the server.
Verify fix installed :
On Ubuntu, package changelog lists CVEs:
zgrep -E 'CVE-2026-10961[89]' /usr/share/doc/php8.3-fpm/changelog.Debian.gzOn Debian, PPA, packages.sury.org, changelog may only say “New upstream version”. Compare dpkg -l output version with fixed versions in tables above.
Debian/Ubuntu notes :
Run zgrep on local file; apt changelog returns 404 for universe packages like php8.3-fpm.
Ubuntu 18.04/20.04 need Ubuntu Pro ESM Infra. sudo pro fix CVE-2026-109618 shows if fix available. On expired interim releases (e.g., 25.10) it may falsely report “does not affect your system”.
Ondřej PPA mirrors may lag. If apt-cache policy php8.3-fpm shows no new version, point source directly to ppa.launchpadcontent.net. php8.3-fpm package auto-restarts PHP-FPM on upgrade, but manual restart verification recommended.
2. Red Hat, AlmaLinux, Rocky Linux
Same steps for Red Hat official packages and Remi modular repos.
# View installed PHP packages and active module stream (RHEL 8/9 only; RHEL 10 has no modules)
rpm -qa 'php*' | sort
dnf module list --enabled php
# Example output:
php 8.2 [e] common [d], devel, minimal PHP scripting language
# Upgrade only PHP packages
sudo dnf upgrade 'php*'
# Verify fix installed
dnf updateinfo list --security | grep php
rpm -q --changelog php-fpm | head -5RHEL notes :
Changelog not always explicit. On 8.2/8.3 module streams may only show “rebase to 8.2.33” without CVE; compare version numbers. On RHEL 9 default 8.0 stream, rpm -q --changelog php-fpm | grep CVE lists CVEs.
Remi SCL-style packages have distinct names (e.g., php84-php-fpm). Upgrade with sudo dnf upgrade 'php84-*' and restart php84-php-fpm. dnf updateinfo needs security metadata (present on AlmaLinux and RHEL; untested on Rocky).
Switching module streams on RHEL 8/9 (e.g., 7.4 → 8.2): must reset module first:
sudo dnf module reset -y php
sudo dnf module enable -y php:8.2
sudo dnf distro-sync -yServices That Must Restart After Upgrade
Running processes keep old PHP cached in memory until restarted.
PHP-FPM (behind nginx, Caddy, Apache proxy_fcgi): sudo systemctl restart php8.3-fpm (Debian/Ubuntu) or sudo systemctl restart php-fpm (RHEL). reload also loads new PHP. Web server itself does not need restart.
Apache with mod_php : sudo systemctl restart apache2 (Debian/Ubuntu) or sudo systemctl restart httpd (RHEL). Note: reload or apachectl graceful are NOT sufficient!
LiteSpeed / OpenLiteSpeed : Upgrade lsphpXY packages from LiteSpeed repo, then sudo pkill lsphp. PHP runs as separate processes; restarting LiteSpeed does not restart them.
FrankenPHP : Install new FrankenPHP release or pull new Docker image. PHP is compiled inside FrankenPHP; apt / dnf cannot fix it.
Docker php: images : Pull new image, rebuild with docker build --pull, recreate containers.
Queue workers, Laravel Octane, Supervisor jobs : Must restart! For Laravel queues: php artisan queue:restart. For Octane: restart server process ( octane:reload only reloads app code, not PHP binary).
Test verification : Author tested PHP-FPM and Apache restart scenarios. After replacing PHP binaries on disk, checked each process's actual running code. FPM reload caused master and all workers to run new binary. apachectl graceful and apachectl -k restart left Apache running old libphp8.3.so in memory. Only full stop+start loads new library.
Check FrankenPHP version:
frankenphp version
# Output: FrankenPHP v1.13.1 PHP 8.4.26 Caddy v2.11.7Check for Processes Still Running Old PHP
Package upgrade replaces disk files. Processes still on old PHP show deleted files in /proc/*/maps as (deleted).
Command listing all such processes; empty output means all processes run new PHP :
sudo grep -lE ' /(usr|lib|opt).*\(deleted\)$' /proc/[0-9]*/mapsNote: Regex intentionally matches only /usr, /lib, /opt. OPcache holds a deleted /dev/zero mapping in each PHP-FPM process; broader pattern would false-positive every healthy PHP-FPM process even before upgrade.
On Ubuntu/Debian, needrestart does the same check:
sudo needrestart -b -r l
# Output example:
NEEDRESTART-SVC: php8.3-fpmOn Ubuntu 24.04 server, needrestart is installed by default and auto-restarts services after each apt run.
Roll Back Early Mitigations
Principle: Patch first, verify no old PHP processes, then roll back mitigations one by one.
Block multipart requests at web server → Remove rule – breaks legitimate file uploads.
Cloudflare custom block rule → Remove rule – blocks real uploads. Cloudflare managed ruleset can stay.
session.upload_progress.enabled = 0 → Keep disabled unless your app actually uses PHP's upload progress bars (very rare).
session.use_strict_mode = 1 → Keep enabled – PHP officially recommends for every site.
fatal_error_backtraces = 0 → Can re-enable – official fix correctly resets its leftover state.
Move settings from .htaccess or PHP_VALUE → Keep in php.ini or FPM pool – better ops practice.
pm.max_requests = 1 → Restore previous normal value – setting to 1 severely hurts PHP throughput.
memory_limit = -1 → Must set a real limit! Without limit, a single rogue request consumes all physical RAM.
Lower post_max_size and input limits → If app still works, keep stricter limits .
Site taken offline → Bring site back online .
Site set to read-only → Remove read-only rule – otherwise all form submissions and logins blocked.
AppArmor/SELinux confinement of PHP → If app still works, keep these security restrictions .
Critical reminder : If you remain on PHP 8.1 or older and your distro provides no patch, keep ALL early mitigations in full until you fully migrate to a supported PHP version.
References
Mattias Geniar original post: https://ma.ttias.be/php-cve-2026-109618-patch/ Mattias early mitigation article: https://ma.ttias.be/php-cve-2026-109618-early-mitigation/ Research team site: https://php2shell.com PHP official downloads: https://www.php.net/downloads.php PHP security advisories: https://www.php.net/archive/2026.php GitHub Advisory Database: CVE-2026-109618: https://github.com/advisories/GHSA-w8hw-w9fx-j79w; CVE-2026-109619:
https://github.com/advisories/GHSA-6wmf-4rv5-p3rpSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
