The hole is in PHP - PHP2Shell
CVE-2026-109618 is a memory exhaustion bug. If a request reaches memory_limit at exactly the wrong moment, PHP can stop partway through initializing internal request data. The cleanup path then treats that half built data as valid and corrupts memory.
Dramatic few days in web development world.
Two critical bugs in PHP itself let an attacker with no account run code on a web server. The fixes are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026. If the PHP runtime that answers requests on your site is older than the matching version, you are exposed right now. Updating WordPress, Laravel, Drupal or your plugins will not change that, because the flaw sits underneath all of them.
The flaws are CVE-2026-109618 and CVE-2026-109619, both rated 9.2 on the CVSS v4.0 scale. An attacker can execute code as the web server user, and can also read the memory of the PHP worker, which may hold database passwords, session tokens, API keys and TLS certificates from other requests. A static "Hello World" page on a vulnerable runtime is enough.
Check the PHP version behind your site now. What follows is a practical guide to the cause, the risk, and the fix, in that order.
The cause: two failures in PHP's request lifecycle
PHP handles every request in stages. It allocates memory, initializes internal request state, runs your code, and tears everything down. Both bugs sit in that machinery, in code that every request touches, which is why they matter far more than a bug in one plugin.
CVE-2026-109618 is a memory exhaustion bug. If a request reaches memory_limit at exactly the wrong moment, PHP can stop partway through initializing internal request data. The cleanup path then treats that half built data as valid and corrupts memory. On Apache with mod_php, the researchers showed a single unauthenticated request reaching code execution before any application code runs. On PHP-FPM the path is narrower because the worker often dies when setup fails, but FPM is not safe. Code execution through application level paths was confirmed.
CVE-2026-109619 is a stale state bug. A fatal error at the wrong point can leave internal state pointing at memory that belonged to a previous request. When the same worker picks up the next request, it can use memory that has already been freed. The researchers demonstrated a use after free, a worker crash, and remote code execution against a real application on mod_php.
The advisory lists every common way of serving PHP as exposed: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The risk is highest on mod_php because the attack can fire before your code is loaded. The underlying mistakes are old. The researchers trace the affected code back more than a decade, with one line of investigation reaching PHP research from 2004.
The exploit is not a single packet that works on every host. The scoring reflects high complexity and specific attack requirements, and CISA's assessment says it is not automatable. That is a small comfort against a mass scanner and no comfort against a targeted attacker, because the settings the demonstrated chains rely on are defaults: a finite memory_limit, session upload progress turned on, and a request body that PHP parses before your code runs.
What an attacker gets
The short version: someone else gets a shell on your server. The longer version is worse.
Code runs as the web server user. That user can usually read your application config, and your application config usually contains database credentials. From there an attacker can dump customer data, write a webshell into an upload directory, add a cron job, create an account, and connect out to whatever the server can reach. Web servers sit in interesting places. A single PHP process can become the first step into an internal network.
The memory disclosure path is the one that keeps incident responders up. If an attacker can read worker memory, they can lift credentials and tokens from requests they never touched. There is no malicious file to find and no child process to notice. CrowdStrike describes attacks where the worker keeps running, the server returns a normal 200, and application logs record nothing unusual. It can look like nothing happened, which is exactly the problem.
On shared hosting and multi tenant platforms, the blast radius multiplies. One lagging tenant on one node can expose every site on that node. If you run a managed WordPress fleet or a hosting panel, this is a fleet level event, not a per site event. The same is true for agencies that maintain dozens of client installs on the same server.
And the window does not close when you patch. If the box was exposed and unpatched for hours or days, you have to assume someone may have been there first.
Why this one is different
PHP runs roughly 70 percent of websites, and WordPress alone is about 40 percent of all websites. The 70 percent figure is usually read as "a lot of WordPress", and WordPress is indeed affected, but the dependency is wider than one CMS. Drupal, Joomla, MediaWiki, Laravel, Symfony, Moodle and Nextcloud all sit on the same runtime. So do a million custom applications nobody has touched since 2017.
The exposure numbers are ugly. Mallory counted about 884,000 internet facing hosts reporting PHP 8.1 or older to Shodan, which is 59 percent of the roughly 1.5 million hosts that reported a version at all. Most of those hosts will never see an upstream PHP fix, although some distribution vendors are backporting one, so check before you write a host off. Another 740,000 hosts reported PHP without a version number, so nobody knows what they run.
The real world response was immediate. BambooHR took its service offline across the United States, Canada and Ireland, warned that payroll would be interrupted, and gave no restoration time. In the Netherlands, MijnOverheid, DigiD, the lower house of parliament's site, the national cyber security centre and several education systems went offline as a precaution. Neither case is a confirmed breach. Both show what a dependency on a shared runtime looks like when the runtime is on fire.
There is also a clock on this. The CVE identifiers leaked on Hacker News on 20 October, PHP moved the release forward by a day, and the container vendor Chainguard published patched images about six hours before the coordinated release. Anyone who wanted to study the fix could do so while most of the internet was still waiting. Cloudflare says it saw early exploitation attempts before the patch even shipped. Within hours of the release, several public proof of concept repositories appeared. Their reliability is disputed, and the PHP Foundation says it found no functional exploit at release time, but that gap is not something to bet a server on. At the time of writing, no successful break in had been confirmed and neither flaw was in CISA's known exploited list. That is a snapshot, not a promise. When CVE-2024-4577, a much narrower PHP bug, became public in 2024, attackers hit honeypots within 24 hours.
Update the runtime, not the application
This is the mistake I expect to see most often this week. People will log into WordPress, see no update, and assume they are fine. Or they will update Laravel, redeploy, and feel done.
The PHP runtime comes from somewhere else. On a normal Linux server it is an operating system package. In a container it is the base image. On shared hosting it is the host's stack. On Windows it is the PHP build plus whichever SAPI is wired into IIS or Apache. None of those are updated by your CMS, your framework or your composer.json.
There is a second trap with distribution packages. Debian and Ubuntu backport security fixes instead of bumping the upstream version, so a patched package can still report something like PHP 8.3.6 while the fix sits in the package revision. Do not judge by the version string alone. Check the package changelog for the CVE, or compare the full package version against the distribution advisory.
On Ubuntu, USN-8948-1 is the fix, with separate builds for 22.04, 24.04, 26.04 and 26.10. Do not confuse it with USN-8936-1 from 19 October, which is the previous PHP batch and does not cover these two CVEs. That is the easiest way to think you patched when you did not.
If you use the volunteer maintained Remi RPM repository, the PHP advisory warns that it did not have updates on release day. A host that gets PHP only from Remi can run dnf upgrade and get a silent no-op. Move to distribution packages, an LTS vendor, or build from source if that affects you.
The fix, in order
1. Find every PHP runtime you own
Not just the web server. Cron jobs, queue workers, CLI scripts, containers, vendor appliances, control panels, Windows builds, CI runners, and that staging box from 2021 that still has a public IP. Start with the one that answers HTTP requests.
Record the branch and the SAPI for each: FPM, mod_php, CGI, FrankenPHP, LiteSpeed. This matters because the version you see in a terminal is not always the version serving the site.
2. Move each branch to the fixed release
The fixed versions are:
- PHP 8.5.12 for the 8.5 branch
- PHP 8.4.27 for the 8.4 branch
- PHP 8.3.36 for the 8.3 branch
- PHP 8.2.35 for the 8.2 branch
Typical commands, adjusted for the package names you actually have:
# Debian and Ubuntu
sudo apt update
sudo apt install --only-upgrade php8.3-fpm php8.3-cli
# RHEL, AlmaLinux, Rocky Linux, Fedora
sudo dnf upgrade --refresh 'php*'
# Alpine
sudo apk upgrade
# Docker
docker pull php:8.4.27-fpm
docker compose up -d --force-recreate
Replace php8.3 with your branch. Pinning the exact patch version is better than pulling a floating tag, because a cached image or a restart can quietly keep the old one. Rebuild your own images with --pull rather than reusing cached layers. On cPanel and Plesk, update the PHP packages through the panel's package manager, rebuild the PHP stack, and check the panel's own PHP too. At the time of writing, Plesk's internal engine was still on an older build after its customer facing PHP packages were patched, and a control panel is just another PHP application with a public login page. If someone else runs your hosting, ask them for the fixed build in writing and get a time.
PHP 8.1 and older will not get an upstream release. The PHP security team published minimal source backports for 7.4, 8.0 and 8.1 for people who build from source or are waiting on a vendor, but that is a bridge, not a home. If you are still on PHP 5.x, this is the week to plan the migration. PHP 8.2 reaches end of life on 31 December 2026, so patching it today and staying on it is a temporary answer.
3. Restart the right processes and verify from the web
Updating files is not the same as updating the running process. Restarting the service is what loads the new binary into the workers that answer requests.
On PHP-FPM, a reload does load the new binary. On Apache with mod_php it often does not. A graceful reload can keep the old libphp module mapped in memory, so do a full restart. Then restart everything else that holds a PHP process: queue workers, Laravel Octane, Supervisor programs, cron entrypoints and long lived CLI daemons. On LiteSpeed, kill the lsphp processes too.
sudo systemctl restart php8.3-fpm
sudo systemctl restart apache2
# check for processes still mapping an old PHP binary
sudo grep -lE ' /(usr|lib|opt).*\(deleted\)$' /proc/[0-9]*/maps
If the grep prints nothing, no process is still holding a replaced PHP file. needrestart on Debian and Ubuntu does a similar check. In containers, pull the new image, rebuild your own image with --pull, and recreate the container. A plain docker restart reuses the old image.
Then check the version from the same path an attacker would use. A temporary phpinfo() page or a one line script is fine, but delete it afterwards. Confirm the module or FPM pool version, not only php -v on the shell, because the CLI and the web SAPI are often different builds.
The fixed build adds a hard memory ceiling. A worker that reaches it exits with code 137 and shutdown handlers do not run, so revisit memory_limit, post_max_size and the new limit setting after the upgrade, especially if you used memory_limit=-1 as a stopgap.
4. If you cannot patch today, reduce exposure, but do not pretend it is fixed
There is no complete mitigation short of updating. PHP core developer Gina Peter Banyard said it plainly: "The only thing I can say is that the only mitigation is patching/upgrading PHP." Joe Ferguson, the PHP 8.6 release manager, put it shorter: "ini settings won't save you."
What you can do, in order of actual effect:
- Take the service off the public internet. Put it behind a VPN, an IP allowlist or authenticated access at the edge. CERT-EU advised isolating internet facing applications until a fix is available. For an exposed box, this changes the risk more than any PHP setting.
- If it must stay online, cut memory pressure. Setting
memory_limit=-1in the pool or server config, where the application cannot override it, removes one trigger, but it moves memory exhaustion handling to the operating system, so you need a container or cgroup v2 limit such asmemory.maxto contain the damage. Do not useRLIMIT_ASorRLIMIT_DATAinstead, because the advisory warns they can trigger the same failure path. - Lower
post_max_sizeto what the application actually needs. The advisory suggests 8M for sites without uploads and 32M where uploads are required, withupload_max_filesizebelow it. Reducemax_input_nesting_levelif your forms allow it. - Set
session.upload_progress.enabled=0in php.ini, the FPM pool or the server config, not throughini_set()or.user.ini, and restart every worker. On PHP 8.5 also setfatal_error_backtraces=0. These block confirmed attack paths. They do not block the others. - Lower
pm.max_requestsso workers are recycled more often, and use SELinux or AppArmor to limit what the PHP worker can execute. This shrinks the damage, not the chance of a breach. - WAF rules are a stopgap. Cloudflare deployed emergency rules and its CTO called them exactly that. They only see traffic that passes through the provider, and new attack paths can slip past them.
- Some researchers suggest blocking
multipart/form-dataat the web server before it reaches PHP. That targets a suspected entry path rather than a confirmed one, it breaks file uploads and some forms, and it has to cover methods other than POST, because PHP 8.4'srequest_parse_body()can read multipart bodies on those too. Onmod_php, the researchers also triggered the flaw with ordinaryapplication/x-www-form-urlencodedbodies, so a multipart block alone is not a wall.
None of these is a substitute for the version bump. Keep the patch ticket open.
5. After patching, check for damage
If the server was exposed while unpatched, patching stops the bleeding but does not undo a break in. The advisory and researchers list signals worth investigating: unexpectedly large or malformed PHPSESSID response cookies, unusual multipart requests followed by memory limit errors or repeated HTTP 500 responses, and unexplained PHP worker crashes or restarts.
Then look for the usual post exploitation traces:
- New or recently modified PHP files in the web root, upload directories and cache directories
- New cron jobs, systemd units or scheduled tasks
- New local users, SSH keys or database users
- Unexpected child processes of the web server, such as shells,
curl,wgetor interpreters - Outbound connections from the web user to addresses it has no business talking to
- Authentication and access log entries around the time the flaws went public
Preserve the web server and PHP logs before you rotate or redeploy anything. If you find evidence of a break in, rotate database passwords, application keys, API tokens and cloud credentials. If customer data may have been in worker memory, talk to legal about notification duties. Application logs may be thin because the vulnerable paths run below the application, so the absence of evidence is not evidence of safety.
6. Fix the process that made this a crisis
The patch itself took minutes. The reason it matters is that a lot of organizations did not know what PHP they were running, or were running a branch that stopped getting fixes years ago. That is an inventory problem, and it predates this week.
Track the runtime separate from the application. Put critical, internet facing runtimes on a patch path measured in hours, not quarters. Include containers and vendor appliances in the inventory. Remove unsupported branches on a schedule instead of waiting for an emergency. Keep request size and memory limits sane so one request cannot take a worker down. Treat a WAF as a seatbelt, not a brake.
One last thing worth saying. The PHP Foundation's own writeup describes a fix that stalled for months because a small security team lacked the people and funding to make a hard compatibility call. The foundation is funded largely by companies that depend on PHP. If your business runs on this runtime, paying into that work is cheaper than a week when the runtime breaks.
The fix is a version bump and a restart. The cost of skipping it is a server someone else controls, and a breach you may not detect for months.