CVE-2026-109618: PHP out-of-memory handling leaves request memory uninitialized, allowing remote code execution

ByLinuxtastic

November 29, 2026 #CVE, #PHP

When a PHP request runs out of memory the interpreter does not unwind politely; it longjmp()s out of wherever it was and lets the request-cleanup code tidy up. Some of the places it can be jumping out of had not yet initialised the memory they were about to use, and the cleanup code then reads and branches on whatever happened to be there. The PHP project’s advisory says several out-of-memory strategies trigger this reliably from a plain HTTP request and that it reaches remote code execution; the project validated a full exploit against Apache’s mod_php with default limits and rates PHP-FPM as susceptible by analysis. CISA lists it as exploited. If you run PHP 8.2 below 8.2.35, 8.3 below 8.3.36, 8.4 below 8.4.27 or 8.5 below 8.5.12 on anything reachable from the network, upgrade now and restart every PHP worker; the advisory says updating is the only complete fix. This page shows how to find every PHP you are running, what the attack leaves in the logs, how to upgrade on each distribution, and which of the circulating mitigations the project itself says not to use.

CVE-2026-109618 at a glance.

ComponentThe PHP interpreter’s out-of-memory handling and request shutdown, in every SAPI that serves HTTP: Apache mod_php (confirmed exploitable), PHP-FPM behind nginx or Apache (susceptible by source analysis, no complete exploit demonstrated by the project), FrankenPHP and LiteSpeed’s LSAPI (likely, unvalidated). The command-line SAPI is not mentioned by the advisory
Affected versionsPHP 8.2 below 8.2.35, 8.3 below 8.3.36, 8.4 below 8.4.27 and 8.5 below 8.5.12 (PHP advisory GHSA-w8hw-w9fx-j79w). PHP 8.1 and older are out of upstream support and not assessed; the distributions that still ship 8.1 and 8.2 have backported the fix
Fixed inPHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, published with the advisory on 21 October 2026; distribution packages in the table below
SeverityCVSS 4.0 9.2 Critical from the PHP CNA (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H); NVD’s own CVSS 3.1 is 9.8 Critical. Red Hat scores it 8.1 (AC:H) and rates it Important, noting that RHEL ships PHP-FPM rather than mod_php; Ubuntu priority Critical. CWE-416 use after free, with CWE-755, CWE-824, CWE-1325 and CWE-1419 also listed
Exploited in the wildOn CISA’s Known Exploited Vulnerabilities catalogue, added 26 October 2026; federal remediation was due 29 October 2026. Ransomware use is recorded as Unknown. EPSS 0.451 (99.1st percentile) on 25 November 2026
Who is exposedany web server running an affected PHP that accepts requests from the internet; no account is needed, and the project’s validated trigger is a multipart POST crafted to exhaust memory_limit during request startup. Apache with mod_php is the confirmed case; PHP-FPM deployments should assume they are reachable. Not affected: 8.2.35, 8.3.36, 8.4.27, 8.5.12 and later, and the distribution packages in the table
PublishedCVE record 21 October 2026; this page built 29 November 2026, last updated 29 November 2026

What it is

PHP enforces memory_limit with its own allocator, and when a request asks for more than the limit allows the allocator raises a fatal error and bails out with longjmp(), a C-level non-local jump that abandons the current call stack and lands back in the request-handling loop. Everything the abandoned code was in the middle of is simply left as it was. The advisory’s finding is that some of those code paths perform an allocation before they have finished initialising the request structures that the allocation may fail inside, and the shutdown sequence that runs after the bail-out reads those half-built structures and branches on their contents. Memory that was never written holds whatever the previous request left there, which is CWE-824, and if it happens to look like a pointer the cleanup code will follow it, which is how an out-of-memory condition becomes a use after free and then code execution. The advisory lists five CWE identifiers for the one bug because it is a chain: an exceptional condition handled badly, uninitialised state, a controllable allocation pattern, and a dangling reference at the end.

The reason the project rates it as it does is that the attacker controls when the out-of-memory happens. The validated path is a multipart form POST with no usable content length, an unbounded number of headers per part, empty file controls and deeply nested field names, all of which make the request parser allocate during startup until memory_limit is hit at a chosen moment; the advisory adds that application-specific allocations can serve the same purpose. The project built a working remote-code-execution exploit against Apache mod_php in the ordinary prefork configuration with default PHP input and memory limits. For PHP-FPM it found the same vulnerable code by source analysis but did not finish an exploit, and Red Hat’s statement that FPM exploitation is “difficult in practice” is the same judgement from the other side; neither says FPM is safe. The fix landed in all four supported branches on 21 October 2026 with credit to reporters from Wiz, Areion and OpenAI among others, and the project points readers to its companion advisory for CVE-2026-109619, published the same day, which we cover separately.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 29 November 2026; the link in the row is the tracker page, which will be newer than this one. Debian and Ubuntu carry PHP lines that upstream no longer supports, and both have backported the fix into them.

DistributionStatusFixed package
AlpineNot consulted—
DebianFixed: DLA-4848-1 (bookworm php8.2), DSA-6574-1 (trixie php8.4); forky and sid fixed at 8.4.28-3bookworm php8.2 8.2.35-1~deb12u1, trixie php8.4 8.4.27-1~deb13u1
UbuntuPriority Critical; fixed on every supported release (USN-8948-1 and -2, 21 October 2026)26.10 php8.5 8.5.9-0ubuntu2.1, 26.04 php8.5 8.5.4-0ubuntu1.5, 24.04 php8.3 8.3.6-0ubuntu0.24.04.13, 22.04 php8.1 8.1.2-1ubuntu2.28
RHEL, Rocky, Alma, CentOS StreamImportant, bulletin RHSB-2026-013; RHEL ships PHP-FPM, not mod_php. The CVE page as read listed no per-stream erratasee the Red Hat page for the php module errata per stream
Fedora, openSUSE/SLE, ArchNot consulted—
Upstream tarballs, official Docker images, ondrej/php PPA, RemiAffected below the fixed releasesPHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12

How to check

Three questions: which PHP builds are installed (a server often has more than one), which SAPI is actually answering web requests, and what the limits the advisory names are set to. The second matters because php -v reports the command-line binary, and the one serving traffic can be a different package at a different version.

# 1. every PHP on the box, not just the one in $PATH
php -v | head -1
dpkg -l 'php8*' 2>/dev/null | awk '/^ii/ && $2 ~ /^php8\.[0-9]+(-fpm|-cli|$)/{print $2, $3}'     # Debian/Ubuntu
rpm -q php php-fpm php-cli 2>/dev/null                                                          # RHEL family
ls /usr/sbin/php-fpm* /usr/lib/apache2/modules/libphp*.so /etc/httpd/modules/libphp*.so 2>/dev/null

# 2. which SAPI faces the network
apachectl -M 2>/dev/null | grep -i php; httpd -M 2>/dev/null | grep -i php          # mod_php loaded?
systemctl list-units --type=service --state=running | grep -E 'php.*fpm|apache2|httpd|frankenphp|lsws'
php -r 'echo PHP_VERSION, " ", PHP_SAPI, "\n";'

# 3. the knobs the advisory talks about, as the web SAPI sees them
php -i 2>/dev/null | grep -E '^(memory_limit|post_max_size|upload_max_filesize|max_input_nesting_level|max_input_vars|file_uploads)'

If step 1 shows 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later, or the distribution’s fixed package from the table, for every PHP that step 2 shows serving requests, you are done; a vulnerable command-line PHP that nothing exposes is a lower priority but still worth updating in the same run. If step 2 shows php_module loaded into Apache, you are in the configuration the project exploited. If it shows only PHP-FPM, you are in the configuration the project and Red Hat both describe as harder but not safe. Step 3 is for the mitigation section, not for deciding whether you are affected: the exploit was validated against defaults.

Because this one is on the KEV list, look back. The attack has to drive a worker out of memory before it can do anything else, so the signature is a run of “Allowed memory size exhausted” errors from requests that should never be near the limit, followed by workers dying with signal 11; after that, look for what a webshell leaves behind.

# out-of-memory bursts and worker crashes since the advisory
sudo grep -hE 'Allowed memory size|exited on signal 11|SIGSEGV|segmentation fault' \
  /var/log/php*-fpm.log /var/log/php-fpm/*.log /var/log/apache2/error.log /var/log/httpd/error_log 2>/dev/null | tail -50
sudo journalctl -k --since '2026-10-15' | grep -iE 'segfault.*(php|apache2|httpd)'

# multipart POSTs from the same address in bursts (needs the request method in your access log format)
sudo zgrep -h '"POST ' /var/log/nginx/access.log* /var/log/apache2/access.log* 2>/dev/null \
  | awk '{print $1}' | sort | uniq -c | sort -rn | head

# new or changed PHP files in web roots since the advisory, and anything odd running as the web user
sudo find /var/www /srv/www -name '*.php' -newermt '2026-10-21' -type f 2>/dev/null | head -50
ps -u www-data -u apache -o pid,etime,comm,args 2>/dev/null | grep -vE 'php-fpm|apache2|httpd|ps'

A PHP file in a web root that your deployment did not put there, or a shell or downloader running as www-data, is not a false positive. The web worker can read your application’s configuration, which usually means database credentials and API keys, so rotate those and audit the application’s data for changes as well as the host. Restoring a Linux Server covers the rebuild.

How to fix it

Upgrade the PHP packages and restart every worker: the FPM pool, Apache if it loads mod_php, and any long-running PHP process such as a queue worker. The advisory is explicit that all workers must be restarted, because a worker that was started before the update keeps the old code, and it is a long-lived worker that has handled many requests whose leftover memory the bug reads.

# Debian/Ubuntu
sudo apt-get update && sudo apt-get install --only-upgrade 'php8.*'
sudo systemctl restart 'php*-fpm' apache2 2>/dev/null
# RHEL family (module streams: dnf module list php to see which you are on)
sudo dnf update 'php*'
sudo systemctl restart php-fpm httpd 2>/dev/null
# Alpine
apk upgrade 'php8*' && rc-service php-fpm8 restart
# Docker: rebuild FROM php:8.3.36-fpm (or 8.2.35 / 8.4.27 / 8.5.12) and redeploy

# confirm the serving SAPI, not just the CLI
php-fpm8.3 -v 2>/dev/null | head -1; php-fpm -v 2>/dev/null | head -1
curl -sI http://localhost/ | grep -i '^x-powered-by'      # only if expose_php is on

If you cannot upgrade immediately, the advisory offers partial measures and is candid that none is complete. Setting memory_limit = -1 administratively removes the limit the attacker is aiming at, at the cost of letting a runaway request take the box’s memory instead; the project lists it and then says it does not fully mitigate. The others reduce the attacker’s room: keep post_max_size conservative, reduce max_input_nesting_level, bound input variables, multipart parts, headers and uploads, enforce decoded request size at the proxy, and if your application never accepts file uploads, have the proxy reject multipart/form-data altogether. Restart all workers after any of these.

# nginx: refuse multipart bodies on a site that never takes uploads (stopgap, not a fix)
#   inside the server block:
#   if ($content_type ~* "multipart/form-data") { return 415; }
#   client_max_body_size 1m;

# PHP (php.ini or a conf.d drop-in), then restart the workers
#   post_max_size = 2M
#   max_input_nesting_level = 16
#   max_input_vars = 500

Do not reach for RLIMIT_AS or RLIMIT_DATA (ulimit -v or -d on the worker) as a substitute for memory_limit; the advisory specifically says not to, because a failed malloc() from the operating system takes a different path from PHP’s own limit and does not close the hole. Do not conclude from Red Hat’s “difficult in practice” that an FPM server can wait; the project rates FPM as susceptible, the fix is a package update, and the second PHP advisory of the same day has a validated FPM exploit. And do not stop at the command-line php -v: the binary that answers HTTP is the one that counts.

Sources

  • CVE-2026-109618 at CVE.org — the PHP CNA record: description, affected ranges, CVSS 4.0 9.2, the five CWE identifiers (published 21 October 2026)
  • NVD — status Analyzed, NVD’s own CVSS 3.1 9.8, KEV dates (last modified 24 November 2026)
  • CISA Known Exploited Vulnerabilities — added 26 October 2026, action due 29 October 2026
  • PHP advisory GHSA-w8hw-w9fx-j79w, “RCE via OOM corruption” — the mechanism, the per-SAPI findings, the validated trigger, the mitigations and the things not to do, credits (21 October 2026)
  • PHP advisory GHSA-6wmf-4rv5-p3rp — the companion advisory for CVE-2026-109619, which the project says to read alongside this one
  • Distribution trackers: Debian, Ubuntu, Red Hat — status, fixed versions and the FPM statement as of 29 November 2026
  • EPSS — 0.451, 99.1st percentile, scored 25 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 29 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.