PHP 8.5.12 and the 21 October 2026 critical security releases
On 21 October 2026 at about 14:00 UTC the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The php.net announcement says they fix two critical vulnerabilities that can allow unauthenticated remote code execution, and that all PHP users should update immediately. The release tags were created between 14:06 and 14:09 UTC (for example php-8.5.12), and the internals announcements (8.5.12) say there are no complete mitigations. The official release JSON collected at 16:02 UTC reports 8.5.12 dated 2026-10-21.
Advisories
Both advisories were published on 21 October, rated critical (CVSS v4 9.2,
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), and list as affected every version below
8.2.35, 8.3.36, 8.4.27 and 8.5.12 on the respective branch.
| Advisory | CVE | Title | Mechanism, per the advisory |
|---|---|---|---|
| GHSA-w8hw-w9fx-j79w | CVE-2026-109618 | RCE via OOM corruption | PHP exits an out-of-memory error with longjmp(); if an allocation fails while request memory is reachable but not fully initialized, request shutdown can later read or branch on the invalid data. |
| GHSA-6wmf-4rv5-p3rp | CVE-2026-109619 | RCE via stale global state | Worker-global state (error, session, object, extension state) can keep pointing at a freed request heap after a fatal error or a late diagnostic; an operation in a later request on the same worker can use it before normal initialization resets it (use after free). |
SAPI exposure (advisory statements). For the OOM issue, multipart body parsing can reach the memory limit
during request startup. Apache mod_php always runs request shutdown, so the attack happens before any application
code; complete RCE was validated over HTTP against mod_php with default input and memory limits. FPM exits the child
when startup fails, but source analysis supports FPM as susceptible after normal startup, with no complete FPM
exploit demonstrated for this SAPI. FrankenPHP is described as likely susceptible and LSAPI as likely exploitable in
application-specific ways, both unvalidated. For the stale-state issue, the confirmed RCE uses PHP 8.5's
fatal_error_backtraces against mod_php; a session upload-progress path was validated against mod_php and FPM, the
FPM path depending on a suitable application operation. php.net lists PHP-FPM, Apache mod_php, php-cgi, FrankenPHP
and LiteSpeed as at risk and considers the risk highest for mod_php.
Fix. The OOM patch removes longjmp() for out-of-memory errors in favour of a delayed soft OOM at the next VM
safe point plus an immediate _exit() above a second, higher threshold. The stale-state patch resets the wider
request state. The ChangeLog records both under Core as "Avoid state
corruption via bailout".
Interim measures published by the PHP project
The announcement and both advisories state that updating is the only complete mitigation. For installations that
cannot update immediately they list measures that "reduce exposure to specific attack paths but do not make an
installation safe", including: an administratively enforced memory_limit=-1 and conservative post_max_size
(OOM issue); session.upload_progress.enabled=0 and, on PHP 8.5, fatal_error_backtraces=0, set in startup
configuration and followed by restarting every worker (stale-state issue); removing invalid or deprecated per-request
INI settings that emit diagnostics; and not using RLIMIT_AS/RLIMIT_DATA. Read the advisories for the conditions
and limits of each measure; this page does not add advice of its own.
Follow-up: CVE-2026-115560 (23 October)
On 23 October php.net posted an
informational advisory on session upload progress. It suggests
setting session.upload_progress.enabled=0 until the next regular bug-fix release, "to fully protect from an unlikely
RCE vector" tracked as CVE-2026-115560. php.net says the issue needs all of the following: session.serialize_handler
set to php_binary or php_serialize in the configuration, a runtime switch back to php with ini_set() before
session_start(), and session upload progress still enabled. Applications that never change the serialize handler
at runtime can keep the feature enabled. The setting was already a listed mitigation for CVE-2026-109619, so
installations that applied it need no further action. The project is handling the issue in the regular release cycle
and will publish a full advisory with the next release. Affected and fixed versions are not named yet; the wording
"until the next regular bugfix release" implies that the 21 October releases do not fix it. The php.net Atom feed
did not include this post when checked at about 16:10 UTC.
Follow-up: Windows builds with Brotli 1.2.1 (26 October)
On 26 October php.net announced rebuilt Windows packages
8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1, also posted to internals
at about 15:49 UTC. They bundle Brotli 1.2.1, which fixes CVE-2026-111497, an out-of-bounds write in Brotli
decompression. According to php.net, in PHP's Windows builds the vulnerable decoder can be reached through the cURL
extension when automatic HTTP response decompression is enabled; cURL disables it by default, but applications and HTTP
client libraries can enable it. The -1 suffix marks a Windows package rebuild with updated dependencies: the PHP
source releases and runtime versions are unchanged, so this is not a new PHP release. The announcement advises Windows
users to update and names no other platform. Brotli's v1.2.1 release
(21 October) labels CVE-2026-111497 "out-of-bounds write permits remote code execution". No CVSS score or affected
Brotli version range was found: the CVE record could not be fetched (the MITRE CVE API was blocked by the run's network
proxy). The announcement does not discuss non-Windows builds or distribution packages; their exposure was not checked.
The php.net Atom feed had not changed when collected at 17:01 UTC.
Branches and release contents
- 8.2.35 and 8.3.36 (security-only branches): the ChangeLog lists only the two advisory fixes.
- 8.4.27 and 8.5.12: the ChangeLog also lists many regular bug fixes; both were already scheduled bug-fix releases (see the 8.5.12RC1 notes in the 9 October digest).
- PHP 8.1 and older get no releases. php.net says the security team provided minimal source backports for PHP 7.4, 8.0 and 8.1 for people building from source, and that distributions and LTS vendors received the patches in advance.
- PHP 8.6.0RC4 (pre-release, tagged 14:42 UTC): the release managers' announcement (16:21 UTC) says it also contains the fixes for both vulnerabilities and strongly encourages everyone running earlier PHP 8.6.0 builds to update. It is a test release, not for production; 8.6.0RC5 is expected on 5 November.
Timeline and conflicting dates
The 20 October advance notice named 21 October 14:00 UTC. According to the PHP Foundation, the release had been planned for 22 October and was brought forward one day after the CVE IDs, with a wrong release time and a wrong CVSS score of 10.0, began circulating at about 15:00 UTC on 20 October. The post puts the pre-announcement at 19:30 UTC; the 20 October edition recorded the php.net notice at 20:32 UTC. The ChangeLog still dates all four releases 22 Oct 2026, while the tags, announcements and release JSON say 21 October. This page uses 21 October.
The Foundation post also says the OOM root cause was first noticed in 2024 during work on the Quarkslab audit, that the fix stalled over compatibility trade-offs, and that Calif and OpenAI independently reported an RCE with that root cause on 11 August 2026, with further vectors from Wiz (24 August) and OpenAI (18 September). It states that a reporting firm briefly published a proof-of-concept video on 20 October, and that Chainguard published images with the fix at 07:41 UTC on 21 October, before the coordinated release. These are the Foundation's own statements and were not checked with the parties named. The PHP security team "did not identify any functional exploits at the time of release/public disclosure", the post says.
Limitations
The advisory text describes demonstrated and candidate paths; it is not an exposure assessment for any particular
deployment. Distribution packages may carry the fixes without the upstream version number, and the timing of
vendor builds varies (Laravel's
status page, updated 15:49 UTC, said the
upstream Ubuntu PPAs had not yet received the patch and that Forge offered a patched build only for PHP 8.5).
Advisories can be revised later. The Packagist-sourced security-advisories collection queries a fixed list of
Composer packages, which does not include php-src, so it does not track these advisories. The endoflife.date data
collected at 22:01 UTC still listed 8.5.11, 8.4.26, 8.3.35 and 8.2.34 as the latest releases.
Related: PHP 8.5.11, support lifecycle.