PHP fixes two remote code execution flaws (CVE-2026-109618, CVE-2026-109619)
Two critical PHP memory bugs can let an unauthenticated attacker run code on a web server. What is affected, how serious it is, and what to do today.
Researched and drafted with AI assistance · reviewed by Prince

Developing story — last updated 23 October 2026.
In one sentence: if you run PHP on anything that answers web requests, update it to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 today, because two bugs fixed on 21 October can let someone on the internet run their own code on your server without logging in.
A little vocabulary first, because the rest of this post leans on it. PHP is the programming language behind a large share of websites: when a visitor asks for a page, the web server hands the request to PHP, which runs the site’s code and sends the result back. A vulnerability is a flaw that lets someone make software do something its authors never intended. Each of these two has an identifier in the CVE system (Common Vulnerabilities and Exposures, the public catalogue that gives every known flaw one ID so everyone can talk about the same thing): CVE-2026-109618 and CVE-2026-109619. Both are remote code execution flaws, usually shortened to RCE. That means an attacker sends specially crafted requests over the network and ends up running commands of their own choosing on your machine.
We’ve built this from the PHP project’s own advisories, the official CVE records, the US National Vulnerability Database and the alert from CISA, the US Cybersecurity and Infrastructure Security Agency. Where they disagree, we say so. If you only want the actions, skip to Three things to do today.
What happened
On 20 October the PHP security team gave advance notice that a release fixing two critical vulnerabilities would come on 21 October at 14:00 UTC, and that it might come sooner if details leaked or attacks appeared. The fixed versions came out on 21 October, with two advisories on the project’s GitHub page and a notice on php.net. CISA published its alert the same day, using the nickname php2shell for the pair. The credited reporters include researchers from Wiz, who published their own write-up that day.
Both bugs are about memory, the working space a program uses while it handles a request. PHP serves websites with long-lived worker processes: a worker takes a request, does the work, tidies up, then takes the next request. Each bug breaks that tidying up in a different way.
CVE-2026-109618, which PHP titles “RCE via OOM corruption”. OOM means out of memory. When a request goes over its memory allowance, PHP abandons what it was doing and jumps straight to the end of the request. According to PHP’s advisory, in some places that jump can happen after a piece of request memory has been set aside but before it has been filled in, and the clean-up code then reads it as if it were valid. The advisory lists several ways an attacker can force an out-of-memory error while staying inside PHP’s normal limits. Most of them are in how PHP reads multipart form data, the format a browser uses to send files through a web form.
CVE-2026-109619, “RCE via stale global state”. PHP keeps some shared bookkeeping, about errors, sessions, objects and extensions, that can keep pointing at a request’s memory after that memory has been handed back. The advisory says a later request on the same worker can follow that stale pointer before PHP resets it. Using memory after it has been freed is a classic bug class, called a use-after-free.
The second bug is the one most people find abstract, so here is one everyday picture. Imagine a shared office desk with a note saying “your files are in locker 12”, left over after locker 12 has been reassigned to someone else. The next person trusts the note and takes whatever is in locker 12 now. An attacker who can arrange what goes into that locker can steer what happens next, which is how the advisory describes getting from the stale pointer to code execution.
What is affected
The CVE records, which the PHP project publishes for its own software, list the same affected and fixed versions for both bugs:
| PHP branch | Affected | Fixed in |
|---|---|---|
| 8.2 | before 8.2.35 | 8.2.35 |
| 8.3 | before 8.3.36 | 8.3.36 |
| 8.4 | before 8.4.27 | 8.4.27 |
| 8.5 | before 8.5.12 | 8.5.12 |
That table is not the whole story. PHP’s notice says all PHP installations that serve web requests are affected. It names PHP-FPM (the FastCGI Process Manager, a common way to run PHP behind a web server such as nginx), Apache with mod_php (PHP loaded directly into the Apache web server), php-cgi, FrankenPHP and LiteSpeed. The PHP team has also published source-code fixes for PHP 7.4, 8.0 and 8.1, branches it no longer supports, so older versions are clearly exposed too. CISA asks organisations to look for PHP embedded in other software as well, meaning products that ship their own copy of PHP rather than using the one on the server.
The evidence differs by setup. For the out-of-memory bug, PHP’s advisory says full code execution was demonstrated against mod_php with default limits; PHP-FPM is judged susceptible from reading the code, and FrankenPHP and LiteSpeed likely susceptible but untested. For the stale-state bug, code execution was confirmed against mod_php and, through session handling, against PHP-FPM. PHP’s notice rates risk highest for mod_php, because one request from someone who hasn’t logged in can trigger the attack before the website’s own code runs. No source names any web-serving setup as safe.
How serious is it
Severity is usually given as a CVSS score. The Common Vulnerability Scoring System rates a flaw from 0 to 10, with a vector, a short code recording how the attack works. The National Vulnerability Database (NVD, run by the US National Institute of Standards and Technology) and the PHP project have each scored these bugs, with different CVSS versions and different results.
| CVE | NVD, CVSS 3.1 | PHP, CVSS 4.0 |
|---|---|---|
| CVE-2026-109618 | 9.8 critical, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | 9.2 critical, AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| CVE-2026-109619 | 8.1 high, AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | 9.2 critical, same vector as above |
The parts everyone agrees on are the worrying ones. The attack comes over the network (AV:N), needs no account (PR:N) and no action from a user (UI:N), and success means high impact on confidentiality, integrity and availability: in plain terms, the attacker can read, change and break things.
The disagreement is about difficulty. NVD rates the out-of-memory bug as low attack complexity (AC:L), hence 9.8. PHP rates both as high complexity with attack requirements present (AC:H/AT:P), meaning success depends on conditions the attacker doesn’t fully control. That fits PHP’s advisory, which says reliability depends on the build, the extensions, the web server in front and the memory layout. The scores use different CVSS versions, so don’t read 9.2 as a correction of 9.8. Our reading: treat both as critical, as PHP and CISA do.
Has anyone used it yet
Not that anyone has reported. CISA’s alert of 21 October says it “has not observed exploitation of these vulnerabilities”. Both CVE records also carry CISA’s assessment that there is no known exploitation and that the attack is not automatable. Wiz says it combined the bugs into a working script but has not published it.
Read that as a snapshot, not reassurance. PHP’s advisories say full code execution has been demonstrated, and they now describe the bug classes in some detail. We’ll update this post if exploitation is reported or CISA adds either CVE to its Known Exploited Vulnerabilities catalogue, its list of flaws confirmed to be used in real attacks.
What an attacker gets, and what they need first
What they get is the ability to run code as the web worker account, the operating system user that PHP runs as on your server. Whatever that account can read or change, the attacker can too. The stale-state advisory also lists memory disclosure, meaning an attacker could read data from the server’s memory that they shouldn’t see.
What they need first is less than you’d hope:
- Network access to the site. They only have to be able to send web requests to it. No login, and nobody has to click anything.
- For CVE-2026-109618, a way to make PHP run out of memory. The advisory says PHP’s default memory and input limits are enough for the demonstrated attack, and that a site’s own features can provide other routes.
- For CVE-2026-109619, two requests landing on the same worker. One request leaves the stale state behind and a later one uses it. More workers, or recycling workers often, lowers the attacker’s success rate but doesn’t remove the problem. The confirmed routes go through session upload progress, which is on by default, and on PHP 8.5 through a setting called
fatal_error_backtraces.
Wiz adds that the flaws sit in PHP itself, so the website doesn’t need a bug of its own. Its team demonstrated code execution against the then-current WordPress, Drupal and Joomla container images, though working exploits needed several bugs chained and tuning to each target.
How to update
CISA’s advice on order is the right one: inventory everything that runs PHP, then patch internet-facing systems first. Which update you need depends on where your PHP came from.
- From php.net directly: install 8.5.12, 8.4.27, 8.3.36 or 8.2.35, whichever matches your branch. Source code and Windows builds are on the PHP downloads page.
- From your Linux distribution or a long-term support vendor: PHP says these received the patches in advance, so check your vendor’s security notices for the fixed package. If your vendor backports fixes, the package’s version number may not match the numbers above, so go by the vendor’s notice rather than the number alone.
- From a hosting provider, or inside another product: ask the provider or vendor when they will ship the fix, and get the answer in writing.
After updating, make sure the old worker processes have actually gone. A running worker keeps the old code until it is restarted.
If you are on PHP 8.1 or older, the PHP project no longer issues updates. It has published minimal source-code fixes for 7.4, 8.0 and 8.1 for people who build PHP themselves, and some vendors backport fixes. CISA’s guidance is blunt: take those systems offline until they are updated. If you’re patching 8.2, note that it reaches end of life on 31 December 2026 and gets no security fixes after that, so plan the move to a newer branch.
How to tell if you’re exposed
Start with versions. Your hosting dashboard, server management tool or package list will tell you which PHP version each server, container and product runs; if you don’t administer it, ask whoever does. Anything older than the fixed versions in the table above, and every 7.x, 8.0 and 8.1 install, is exposed until patched.
Then look for signs that someone has tried. There are no published network addresses or file names to search for. What the sources give are behaviour patterns:
- Wiz suggests watching for unusual multipart requests (file-upload style requests) followed by memory-limit errors or repeated server error responses (HTTP status 500).
- Wiz also flags unexpectedly large or malformed
PHPSESSIDcookies, the cookie PHP uses to keep track of a visitor’s session, in your server’s responses. - Wiz lists unexplained churn of PHP workers, meaning workers crashing and restarting more than usual.
- CISA asks you to watch for PHP worker processes starting command shells or downloading tools. That is a sign of a successful attack rather than an attempt.
Treat the first three as leads. Busy sites produce memory errors and restarts for ordinary reasons, so a hit is a reason to look closer, not proof of attack. The fourth deserves an incident response.
If you can’t update today
PHP is clear that updating is “the only complete mitigation”, and its notice says none of these stopgaps make a server safe. They reduce risk while you arrange the update. Set them in the main configuration (php.ini, the PHP-FPM pool or the web server configuration), not from inside the site’s code, and restart every worker afterwards.
- Remove the memory limit: set
memory_limitto-1so applications can’t override it. Cost: a runaway script can use all available memory, so PHP suggests a container or cgroup limit (an operating-system memory cap on a group of processes) as the safety net, but not theRLIMIT_ASorRLIMIT_DATAlimits, which can trigger the very failure you’re avoiding. - Cap request sizes:
post_max_sizeof8M, or32Mif you accept uploads, withupload_max_filesizebelow it, plus size and count limits at the web server or proxy in front. Cost: large legitimate uploads are rejected. - Block multipart requests at the front end if your site takes no uploads. Cost: any form that sends files stops working.
- Turn off session upload progress (
session.upload_progress.enabledset to0). Cost: no upload progress reporting. PHP suggests leaving it off after patching if you don’t need it. - On PHP 8.5, set
fatal_error_backtracesto0. Cost: fatal errors lose their backtrace, which makes debugging harder. - Recycle workers after every request (
pm.max_requests=1in PHP-FPM), which the second advisory suggests if performance allows. Cost: performance. - Put a web application firewall in front, a filter that inspects requests before they reach your site, as CISA suggests for the short term. Cost: tuning effort, and it blocks known patterns rather than fixing the bug.
Each setting closes one known route, and Wiz notes that other variants are likely. Use them to buy days, not weeks.
What’s still unknown or disputed
- Severity. NVD (CVSS 3.1) and PHP (CVSS 4.0) disagree on how hard the attack is, as set out above.
- Which versions. The CVE records list 8.2 to 8.5. PHP’s backports show 7.4, 8.0 and 8.1 are affected too, and Wiz says the flaws reach back to PHP 5.4. PHP hasn’t stated a lower bound, so assume anything older is affected.
- Which setups. Other setups are rated susceptible without a demonstrated exploit. Not demonstrated is not the same as safe.
- Exploitation. None observed as of CISA’s alert on 21 October. That can change quickly now details are public.
- Exposure figures. Some coverage puts a percentage on how much of the web is affected. We found no methodology behind those figures and have left them out.
Three things to do today
- Find every copy of PHP you’re responsible for. That means websites, internal tools, containers, and products that ship their own PHP. For each, write down the version and who can update it.
- Update the internet-facing ones first to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to your vendor’s fixed package, then restart the PHP workers so the old code is gone. Anything on 8.1 or older that can’t be fixed today should come offline, as CISA advises.
- For anything you can’t update today, apply the stopgaps above and start watching. Look out for the memory errors, worker restarts and odd session cookies described earlier, and treat a PHP process starting a command shell as an incident.
Sources
- RCE via OOM corruption (GHSA-w8hw-w9fx-j79w)
- RCE via stale global state (GHSA-6wmf-4rv5-p3rp)
- Security advisory: Critical remote code execution vulnerabilities, update now
- Upcoming Critical PHP Security Release
- Supported Versions
- CVE-2026-109618
- CVE-2026-109619
- CVE-2026-109618: RCE via OOM corruption
- CVE-2026-109619: RCE via stale global state
- Critical Vulnerabilities in PHP Require Immediate Patching
- PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
Was this useful?