VulnWatch by ve1ve2
critical 9.2 KEVEXPLOITEPSS 100.0%

GHSA-w8hw-w9fx-j79w / CVE-2026-109618: RCE via OOM corruption

Source:
PHP releases (GitHub php/php-src tags)
Published:
Fetched:
Updated:
Affects:
php php-src
KEV due:
2026-10-29

https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w ↗

repo-advisoryphpCWE-416CWE-755CWE-824CWE-1325CWE-1419securityrepo:php/php-src

RCE via OOM corruption ## Summary PHP uses `longjmp()` for out-of-memory (OOM) errors to exit the current context and abort handling of the request. In some contexts, request memory is temporarily reachable before it is fully initialized. If any allocation fails at that point, PHP does not properly account for the early exit and leaves the request memory in an invalid state. The failed allocation does not need to be related to the invalid memory. The request shutdown procedure may then read or branch on it. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE). ## Vulnerability ### OOM strategies Several multipart parsing problems can let a request reach OOM while remaining within its apparent PHP limits: - A multipart request without a usable declared content length may pass the initial `post_max_size` check and continue supplying decoded body data. - A multipart part can contain an unrestricted number of headers. Representing these headers inside PHP can use substantially more memory than their wire representation, allowing a request within `post_max_size` to exhaust the normal `memory_limit`. - Empty file controls do not count towards `max_file_uploads` but still create the normal file metadata arrays. Nested field names multiply the generated array work. OOM can also be reached in application-specific ways when attacker-controlled input causes a sufficiently large allocation or repeated memory use. ### Susceptibility Apache mod_php unconditionally invokes the request shutdown procedure, even when request startup has failed. During request startup, automatic body parsing can exhaust the configured memory limit and exit the request in a context where state is temporarily invalid. Shutdown then processes this invalid state. This happens entirely before any application-specific code begins execution. FPM exits the child when request startup fails. This prevents consumption of the invalid state and removes the child from the pool. After normal startup, OOM may still be reached in a context failing to account for an early exit, with the invalid state being processed during request shutdown. Source analysis therefore supports FPM as susceptible, though no complete FPM exploit has been demonstrated for this SAPI. Source analysis indicates that FrankenPHP, analogous to Apache mod_php, calls the request shutdown procedure unconditionally, making it likely susceptible to application-independent attacks. LSAPI models FPM, with application-specific exploits being likely but unvalidated. ## Mitigation The patch removes `longjmp()` for OOM, avoiding an early exit out of contexts that do not properly account for it. It is replaced with a delayed, graceful soft OOM triggered at the next VM safe point, and an immediate hard OOM using `_exit()` if memory consumption reaches a second, higher threshold. The shutdown procedure will no longer see invalid state, and PHP's normal ability to limit memory Affected packages: php:php-src Patched: php-src 8.2.35, php-src 8.3.36, php-src 8.4.27, php-src 8.5.12

Linked vulnerabilities (2)

CVE-2026-109618 critical 9.2 KEVEPSS 100.0% (p100) NVDCVE.orgGHSAGHSA
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. Some contexts may not properly account for this scenario and leave request memory in an uninitialized state before performing an allocation. The subsequent request cleanup procedure may read or branch on this memory. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE).

CWE: CWE-416, CWE-755, CWE-824, CWE-1325, CWE-1419KEV added 2026-10-26, due 2026-10-29Aliases: CVE-2026-109619, GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rpNVD: Analyzed
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

RCE via OOM corruption

CWE: CWE-416, CWE-755, CWE-824, CWE-1325, CWE-1419Aliases: CVE-2026-109618, CVE-2026-109619, GHSA-6wmf-4rv5-p3rp

Also reported by (2)