CVE-2026-109618: PHP out-of-memory handling corrupts request memory, remote code execution
Exploited in the wild Critical 9.2 EPSS 100.0% PHP
When PHP hits an out-of-memory error it aborts the request with longjmp(), which can leave request memory partly initialized; request cleanup then treats it as valid, which attackers can turn into remote code execution. An unauthenticated attacker can trigger the out-of-memory condition with crafted multipart POST requests, and with Apache mod_php this happens before any application code runs; PHP-FPM is also considered susceptible. Fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35; CISA added it to the Known Exploited Vulnerabilities catalog on 26 October 2026.
Also known as “php2shell”.
- CVE-2026-109618CVE identifier
- 9.2CVSS 4.0 base score (critical)
- 2026-10-26added to CISA's exploited list (US federal deadline 2026-10-29)
- 100.0%EPSS: chance of exploitation in the next 30 days (higher than 100% of CVEs)
- 2026-10-21published
What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms
What to do now
- Check whether you run PHP and which version (commands below).
- Install the fixed version for your system: see “Patch it” below.
- Restart every PHP worker so no process keeps running the old code: PHP-FPM (php8.x-fpm / php-fpm / php-fpm8x / php_fpm), Apache when mod_php is used (apache2 / httpd / apache24), and FrankenPHP or LiteSpeed (lsphp) where used. Containers must be rebuilt from a fixed image and recreated. No reboot is needed.
- If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.
- Because this flaw is being exploited, also check the server for signs of compromise.
Affected and fixed versions
Affected:
- PHP 8.2.0 through 8.2.34
- PHP 8.3.0 through 8.3.35
- PHP 8.4.0 through 8.4.26
- PHP 8.5.0 through 8.5.11
- Unsupported branches (PHP 8.1 and older) get no upstream release; NVD lists this CVE as affecting PHP from 7.3.0, and distros/LTS vendors ship backports (PHP published minimal source backports for 7.4, 8.0 and 8.1).
Fixed in:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
Am I affected?
php -v # CLI binary; also check the binary actually serving web requests
dpkg -l 'php*' 'libapache2-mod-php*' | grep ^ii # Debian/Ubuntu
rpm -qa 'php*' | sort # RHEL/Alma/Rocky/SUSE
apk info -v | grep '^php8' # Alpine
pkg info -x '^(php8|mod_php8)' # FreeBSD
pkg audit -F # FreeBSD: lists vulnerable packages from VuXML
apachectl -M 2>/dev/null | grep -i php # is Apache mod_php loaded? (highest risk per php.net)
php -i | grep -E '^(memory_limit|session.upload_progress.enabled|fatal_error_backtraces) '
Patch it
Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.
Debian
sudo apt update
sudo apt install --only-upgrade $(dpkg-query -W -f='${Package}\n' 'php8.*' 'libapache2-mod-php8.*' 2>/dev/null)
# expect php8.4 >= 8.4.27-1~deb13u1 (trixie) or php8.2 >= 8.2.35-1~deb12u1 (bookworm)
sudo systemctl try-restart 'php*-fpm.service' apache2.serviceUbuntu
sudo apt update
sudo apt install --only-upgrade $(dpkg-query -W -f='${Package}\n' 'php*' 'libapache2-mod-php*' 2>/dev/null)
# 20.04 and older: fixes are in Ubuntu Pro/ESM (sudo pro attach first)
sudo systemctl try-restart 'php*-fpm.service' apache2.serviceRHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh 'php*'
# RHEL 7 ELS: sudo yum update 'php*'
sudo systemctl try-restart php-fpm.service httpd.serviceFedora
sudo dnf upgrade --refresh php-fpm php-cliSUSE / openSUSE
sudo zypper refresh
sudo zypper patch --category security
# openSUSE Tumbleweed: sudo zypper dup
sudo systemctl try-restart php-fpm.service apache2.serviceAmazon Linux
sudo dnf upgrade --releasever=latest php8.4 php8.4-fpm (or the installed php8.x)Arch Linux
sudo pacman -SyuAlpine
sudo apk update
sudo apk upgrade
apk info -v | grep -E '^php8[2-5]-8' # expect 8.2.35-r0 / 8.3.36-r0 / 8.4.27-r0 / 8.5.12-r0
sudo rc-service php-fpm84 restart # use your suffix: php-fpm83, php-fpm85 ...FreeBSD
sudo pkg update
sudo pkg upgrade
sudo pkg audit -F
sudo service php_fpm restart
sudo service apache24 restart # if mod_php is usedDocker images
# official image: rebuild on a fixed tag (8.5.12, 8.4.27, 8.3.36, 8.2.35 or the moving 8.x tags)
docker pull php:8.4-fpm # or your variant: -apache, -fpm-alpine, -cli ...
docker compose build --pull
docker compose up -d
docker compose exec <service> php -vBuilt from source
V=8.4.27 # or 8.5.12 / 8.3.36 / 8.2.35
curl -LO https://www.php.net/distributions/php-$V.tar.xz
sha256sum php-$V.tar.xz # compare with https://www.php.net/downloads.php
tar xf php-$V.tar.xz && cd php-$V
php -i | grep 'Configure Command' # reuse your old configure options
./configure <same options>
make -j"$(nproc)"
sudo make install
# then restart php-fpm / Apache / FrankenPHP / LiteSpeed workersGeneral update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.
Fix status in Linux distributions
| Release | Package | Status | Fixed version / advisory |
|---|---|---|---|
| Debian 12 | php8.2 | fixed | 8.2.35-1~deb12u1 |
| Debian 13 | php8.4 | fixed | 8.4.27-1~deb13u1 |
| Debian testing | php8.4 | fixed | 8.4.27-1 |
| Ubuntu 18.04 (ESM) | php7.2 | fixed | 7.2.24-0ubuntu0.18.04.17+esm14 |
| Ubuntu 20.04 (ESM) | php7.4 | fixed | 7.4.3-4ubuntu2.29+esm5 |
| Ubuntu 22.04 | php8.1 | fixed | 8.1.2-1ubuntu2.28 |
| Ubuntu 24.04 | php8.3 | fixed | 8.3.6-0ubuntu0.24.04.13 |
| Ubuntu 26.04 | php8.5 | fixed | 8.5.4-0ubuntu1.5 |
| Ubuntu 26.10 | php8.5 | fixed | 8.5.9-0ubuntu2.1 |
| Red Hat Enterprise Linux 9 | php:8.2-9080020261020145734.9 | fixed | RHSA-2026:87072 |
| Red Hat Enterprise Linux 9 | php:8.3-9080020261020115403.9 | fixed | RHSA-2026:87079 |
| Red Hat Enterprise Linux 9 | php-0:8.0.30-8.el9_8.1 | fixed | RHSA-2026:87151 |
| Red Hat Enterprise Linux 9 | php:8.4/php | affected | |
| Red Hat Enterprise Linux 8 | php:8.2-8100020261020140951.f7998665 | fixed | RHSA-2026:87073 |
| Red Hat Enterprise Linux 8 | php:7.4-8100020261021081045.f7998665 | fixed | RHSA-2026:87080 |
| Red Hat Enterprise Linux 6 | php | out of support scope | |
| Red Hat Enterprise Linux 10 | php-0:8.3.36-1.el10_2 | fixed | RHSA-2026:87070 |
| Red Hat Enterprise Linux 10 | php8.4-0:8.4.27-1.el10_2 | fixed | RHSA-2026:87071 |
| Debian 13 (trixie) | php8.4 | fixed | 8.4.27-1~deb13u1 (DSA-6574-1) |
| Debian 12 (bookworm, LTS) | php8.2 | fixed | 8.2.35-1~deb12u1 (DLA-4848-1) |
| Debian forky/sid | php8.4 | fixed | 8.4.27-1 |
| Ubuntu 26.10 (stonking) | php8.5 | fixed | 8.5.9-0ubuntu2.1 (USN-8948-1) |
| Ubuntu 26.04 LTS (resolute) | php8.5 | fixed | 8.5.4-0ubuntu1.5 (USN-8948-1) |
| Ubuntu 24.04 LTS (noble) | php8.3 | fixed | 8.3.6-0ubuntu0.24.04.13 (USN-8948-1) |
| Ubuntu 22.04 LTS (jammy) | php8.1 | fixed | 8.1.2-1ubuntu2.28 (USN-8948-1) |
| Ubuntu 20.04 (focal, Ubuntu Pro/ESM) | php7.4 | fixed | 7.4.3-4ubuntu2.29+esm5 (USN-8948-2) |
| Ubuntu 18.04 (bionic, Ubuntu Pro/ESM) | php7.2 | fixed | 7.2.24-0ubuntu0.18.04.17+esm14 (USN-8948-2) |
| Ubuntu 16.04 (xenial, Ubuntu Pro/ESM) | php7.0 | fixed | 7.0.33-0ubuntu0.16.04.16+esm22 (USN-8948-2) |
| Ubuntu 14.04 (trusty, Ubuntu Pro/ESM) | php5 | fixed | 5.5.9+dfsg-1ubuntu4.29+esm18 (USN-8948-2) |
| RHEL 10 | php | fixed | 8.3.36-1.el10_2 (RHSA-2026:87070) |
| RHEL 10 | php8.4 | fixed | 8.4.27-1.el10_2 (RHSA-2026:87071) |
| RHEL 9 | php (8.0, default) | fixed | 8.0.30-8.el9_8.1 (RHSA-2026:87151) |
| RHEL 9 | php:8.2 module | fixed | php:8.2-9080020261020145734.9 (RHSA-2026:87072) |
| RHEL 9 | php:8.3 module | fixed | php:8.3-9080020261020115403.9 (RHSA-2026:87079) |
| RHEL 8 | php:8.2 module | fixed | php:8.2-8100020261020140951.f7998665 (RHSA-2026:87073) |
| RHEL 8 | php:7.4 module | fixed | php:7.4-8100020261021081045.f7998665 (RHSA-2026:87080) |
| SUSE Linux Enterprise 16.1 | php8 | fixed | 8.5.12-160100.1.1 |
| SUSE Linux Enterprise 16.0 / openSUSE Leap 16.0 | php8 | fixed | 8.4.27-160000.1.1 (SUSE-SLES-16.0-1955) |
| SLES 15 SP7 (Web and Scripting module) | php8 | fixed | 8.3.36-150700.3.24.1 (SUSE-SU-2026:4844-1) |
| SLES 15 SP6-LTSS | php8 | fixed | 8.2.35-150600.3.39.1 (SUSE-SU-2026:4843-1) |
| SLES 15 SP4/SP5-LTSS | php8 | fixed | 8.0.30-150400.4.80.1 (SUSE-SU-2026:4852-1) |
| openSUSE Tumbleweed | php8 | fixed | 8.5.12-1.1 |
| Alpine 3.23, 3.24, edge | php83 / php84 / php85 | fixed | 8.3.36-r0 / 8.4.27-r0 / 8.5.12-r0 |
| Alpine 3.22 | php82 / php83 / php84 | fixed | 8.2.35-r0 / 8.3.36-r0 / 8.4.27-r0 |
| FreeBSD ports/pkg | php82 / php83 / php84 / php85 | fixed | 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 (VuXML d8e16d08-cd2f-11f1-8135-8447094a420f) |
| Docker official image (php) | php | fixed | tags 8.5.12-*, 8.4.27-*, 8.3.36-*, 8.2.35-* |
| Sury repo (packages.sury.org, Debian 12/13) / ondrej PPA (Ubuntu) | php8.2 / php8.3 / php8.4 / php8.5 | fixed | 8.2.35-1+... / 8.3.36-1+... / 8.4.27-1+... / 8.5.12-1+... |
| Remi repo (EL9) | php (module php:remi-8.x) / php8x-php | fixed | 8.2.35-1 / 8.3.36-1 / 8.4.27-1 / 8.5.12-1 |
From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.
If you cannot patch yet
- Updating is the only complete fix (PHP). The steps below reduce exposure but do not make a server safe.
- Set memory_limit=-1 in a way applications cannot override (php_admin_value memory_limit -1 in the FPM pool or Apache config), make sure no pool, directory or app setting restores a finite limit, and restart every worker. An underlying allocation failure can still reach the vulnerable path.
- Keep post_max_size low (PHP suggests 8M without file uploads, 32M with uploads) and upload_max_filesize below it; reduce max_input_nesting_level and enforce limits at the web server/proxy for decoded request size, input fields, multipart parts, headers per part and nesting depth, including for requests without a usable Content-Length.
- A container or cgroup memory limit (memory.max) can serve as an availability boundary, preferably killing only the affected worker. Do not use RLIMIT_AS or RLIMIT_DATA: they make allocations fail and trigger the vulnerable path.
- Blocking multipart/form-data at the web server or proxy is a partial measure only. PHP's advisory says: if the application does not use multipart form data, block such requests at the frontend before they reach PHP; AWS also suggests blocking multipart file uploads while patching is delayed. It removes the confirmed application-independent OOM triggers (multipart parsing), but PHP notes OOM can also be reached in application-specific ways, so it does not fix the flaw and breaks file uploads. Example for nginx (inside the PHP location): if ($content_type ~* "multipart/form-data") { return 415; }
- Also apply the CVE-2026-109619 mitigations (session.upload_progress.enabled=0 etc.); PHP asks admins to follow both advisories.
- PHP 8.1 or older that cannot be patched: CISA advises taking the system offline until it is updated.
Look for signs of exploitation
- PHP error log entries 'PHP Fatal error: Allowed memory size ... in Unknown on line 0' (memory exhaustion before any script runs), used in CISA's SIGMA rule.
- POST requests with multipart/form-data bodies containing the field PHP_SESSION_UPLOAD_PROGRESS (CISA SIGMA rule, AWS).
- Unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, unexplained PHP worker churn, and unusually large or malformed PHPSESSID cookies (Wiz).
- PHP worker processes (php-fpm, apache2/httpd, php-cgi) starting shells or tools such as sh, bash, curl, wget or nc (CISA).
- AWS saw exploitation attempts from 17 October 2026, four days before disclosure: start log reviews from that date.
CISA required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
This vulnerability affects an open-source component, third-party library, protocol, or proprietary implementation that could be used by different products. For more information, please see: https://www.php.net/ ; https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching ; BOD 26-04: https://www.cisa.gov/news-events/directives/bod-26-04-prioritizing-security-updates-based-risk ; Forensics Triage Requirements: https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk ; https://nvd.nist.
Related vulnerabilities
Sources
- CVE-2026-109618 (CVE.org)
- CVE-2026-109618 (NVD)
- CISA KEV entry
- Debian security tracker
- Ubuntu CVE page
- Red Hat CVE page
- SUSE CVE page
- Alpine security tracker
- PHP security advisory: Critical remote code execution vulnerabilities, update now (21 Oct 2026)
- PHP 8.5.12 release announcement
- PHP 8.4.27 release announcement
- PHP 8.3.36 release announcement
- PHP 8.2.35 release announcement
- PHP 8 ChangeLog
- PHP informational advisory: Session upload progress (23 Oct 2026, CVE-2026-115560)
- GHSA-w8hw-w9fx-j79w: RCE via OOM corruption
- GHSA-6wmf-4rv5-p3rp: RCE via stale global state
- CISA alert: Critical Vulnerabilities in PHP Require Immediate Patching
- CISA SIGMA rule for php2shell
- AWS: Amazon threat intelligence identifies PHP2Shell exploitation prior to public disclosure
Page generated automatically from official sources on 2026-11-03 17:06 UTC and reviewed by an editor. Always confirm with your vendor's advisory.