CVE-2026-109618 and CVE-2026-109619 are critical remote code execution vulnerabilities in the PHP runtime: the first is memory corruption after out-of-memory handling, the second a use after free of stale global state, affecting PHP before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 [S1][S2][S3].
The PHP project rates both flaws critical and says they can allow unauthenticated remote code execution; its advice is to update immediately [S3]. The first flaw, RCE via OOM corruption, lets an out-of-memory failure interrupt PHP while request memory is only partly initialized, and request shutdown may then act on that invalid state [S1]. The second, RCE via stale global state, lets request-owned state survive after its memory is freed, so a later request handled by the same worker can use it before normal initialization resets it [S2]. Both advisories give a CVSS v4 score of 9.2 [S1][S2].
Does this affect apps built with AI tools?
Only if your app runs PHP. A typical AI-built stack of Next.js, React, Vite, Supabase, Firebase or Vercel with npm or PyPI packages does not run the PHP runtime, so these two vulnerabilities do not apply to it [S3]. If any part of your product is served by PHP, such as a Laravel or WordPress site, a Composer-based API or a PHP admin panel on your own server or shared hosting, treat it as exposed: the PHP project says all PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed [S3]. The risk is highest for Apache mod_php, where the maintainers demonstrated an exploit in which an unauthenticated request triggers the attack before any application code runs [S1][S3].
Affected and fixed versions
The maintainer advisories list these affected ranges and first fixed releases [S1][S2]:
| PHP branch | Affected | First fixed release |
|---|---|---|
| 8.5 | before 8.5.12 | 8.5.12 |
| 8.4 | before 8.4.27 | 8.4.27 |
| 8.3 | before 8.3.36 | 8.3.36 |
| 8.2 | before 8.2.35 | 8.2.35 |
PHP 8.1 and older no longer receive updates from the PHP project; some Linux distributions and LTS vendors ship backported fixes, and the PHP security team published minimal source backports for PHP 7.4, 8.0 and 8.1 for people who build from source [S3]. PHP 8.2 itself reaches end of life on 31 December 2026 and gets no security fixes after that date [S3].
How to fix
- Upgrade every PHP runtime that serves web traffic to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to your distribution's patched package; the advisories call updating the only complete mitigation [S1][S2][S3]. Linux distributions and LTS vendors received the patches in advance, so check your vendor's package channel first [S3].
- Rebuild and redeploy container images whose base image pins an older PHP release, then restart every PHP worker so no process keeps running the vulnerable runtime [S1][S3].
- If you are on PHP 8.1 or older, upgrade to a supported branch or get a backported fix from your vendor [S3].
If you cannot update immediately, these settings reduce exposure to specific attack paths but do not make an installation safe [S3]:
- For CVE-2026-109618, set memory_limit to -1 in configuration the application cannot override, such as php_admin_value in the FPM pool or Apache configuration, keep post_max_size low, and enforce request size and multipart limits at the web server or proxy [S1][S3]. Do not use RLIMIT_AS or RLIMIT_DATA instead, because they can trigger the vulnerable allocation failure [S1][S3].
- For CVE-2026-109619, set session.upload_progress.enabled to 0 in php.ini, the FPM pool or server configuration and restart every worker; on PHP 8.5 also set fatal_error_backtraces to 0 [S2][S3]. Remove invalid or deprecated per-request settings that emit diagnostics before initialization, because hiding diagnostics with error_reporting, display_errors or the @ operator does not help [S2][S3].
- Fix fatal errors and execution timeouts that an attacker can reach, including failures in upload or import processing, callbacks and cleanup [S2][S3].
How to verify the fix
Check the PHP version that actually serves requests, not only the one on your shell path, because the CLI, PHP-FPM and Apache mod_php can be different builds [S3]. On the server, run:
php -v
php-fpm -vThen check the runtime your web server uses, for example through a phpinfo() page limited to your own IP address and deleted afterwards, or in your hosting control panel.The reported version must be 8.5.12, 8.4.27, 8.3.36, 8.2.35 or later on its branch, or a vendor package that lists the fix for both CVE-2026-109618 and CVE-2026-109619 [S1][S2][S3]. Finally, restart every PHP worker and confirm that no pool, directory or application setting puts back a finite memory_limit you meant to remove [S1].
