Out of memory, out of control.
- A crafted uploadThe attacker sends a multipart request built to exhaust memory while still inside PHP's apparent limits.
- PHP bails outOn out-of-memory, PHP uses
longjmp()to escape. Some request memory is reachable before it is fully initialised. - Shutdown trusts garbageRequest cleanup reads and branches on that half-built memory as if it were valid.
- Code executionConfirmed for unauthenticated RCE under Apache mod_php. FrankenPHP and LSAPI are likely susceptible.
Technical detail
Advisory: GHSA-w8hw-w9fx-j79w
Vector: 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
Weaknesses: CWE-416, CWE-755, CWE-824, CWE-1325, CWE-1419
The fix: removes longjmp() for OOM. It adds a delayed soft OOM at the next VM safe point and a hard OOM that calls _exit() at a higher threshold.