Last night Kirill Firsov, CTO of FearsOff, posted a three-minute video on X with a short caption: “php2shell. Tomorrow is a helluva day.”
He wasn’t exaggerating. Today, October 21, the PHP project shipped emergency fixes for two critical vulnerabilities in PHP itself, now known as PHP2Shell. Details leaked before the planned disclosure, exploits were already circulating, and Cloudflare reported attacks on PHP sites hours before the patch went out.
If you run anything on PHP, this is the update to drop everything for.
php2shell
Kirill Firsov (@k_firsov), October 20, 2026
Tomorrow is a helluva day.
The video walks through the exploit chain, which Firsov credited to the security firm Calif. A few hours later he followed up with a stopgap and a blunt instruction: “UPGRADE TO THE LATEST PHP after 2pm UTC.”
What PHP2Shell is
PHP2Shell is the name for two vulnerabilities, CVE-2026-109618 and CVE-2026-109619. The PHP security team rates both 9.2 (critical) on CVSS v4.0. watchTowr scored them a full 10.0.
What matters most is where the bugs live. They are not in WordPress, a plugin or a framework. They are in PHP’s core engine, so your own code doesn’t need to be vulnerable at all. PHP says the risk covers “all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.” Wiz, one of the teams that found the bugs, says every PHP version released in the last decade is affected by at least one of them, going back to PHP 5.4 from 2012. Wiz also points out that PHP powers about 70% of websites.
In plain terms, here is what goes wrong:
- An attacker sends requests designed to push PHP into a fatal error, such as running out of memory. The warning signs Wiz and Sansec published point at unusual multipart (file upload style) requests and malformed session cookies.
- The fatal error interrupts PHP partway through setting up or cleaning up the request, and PHP leaves behind internal state that points at memory it has already freed.
- The next request handled by that same PHP worker picks up the stale state. Depending on the path, that leaks memory from other requests or corrupts memory in a way the attacker can steer.
The two CVEs map to those failure modes:
- CVE-2026-109618, “RCE via OOM corruption”: out-of-memory handling can interrupt PHP while request data is only partly initialized, and cleanup then treats the invalid data as valid. Sansec notes it also allows a Heartbleed-style memory leak.
- CVE-2026-109619, “RCE via stale global state”: request-owned state survives after its memory is freed, and a later request on the same worker uses it before it gets reset.
The end result is unauthenticated remote code execution. PHP says the risk is highest on mod_php, with “a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.” No login, no vulnerable plugin, no user interaction. Sansec lists confirmed pre-auth code execution against current versions of WordPress, Drupal, Joomla, Magento, Nextcloud, MediaWiki, Roundcube, phpMyAdmin, Laravel, Symfony and WHMCS.
Why the window is measured in minutes
Coordinated disclosure normally gives defenders a head start. This one fell apart.
- August 11: Calif reports the first bug to PHP. Wiz sends its own findings on August 24.
- October 20: PHP publishes an advance notice that a critical release is coming at 14:00 UTC the next day. Details leak before the embargo ends, proof-of-concept code and write-ups start circulating, and watchTowr confirms the vulnerabilities are real.
- October 20, 20:27 UTC: Firsov posts the video above.
- October 21, 07:43 UTC: Cloudflare reports early attacks against PHP sites and pushes emergency WAF rules.
- October 21, 13:34 UTC: PHP’s GitHub security advisories go public, with the fixed releases following at 14:00 UTC.
Before the release, Sansec put it bluntly to Ars Technica: “We expect mass attacks to start within 15 minutes of the release.”
The reasoning is simple. Once a fix is public, attackers compare the old and new code to see exactly what changed, and that turns a vague advisory into a working exploit. With exploits already leaked, they had even less work to do. Sansec’s guidance after the release hasn’t softened: “We expect mass exploitation now that the patch and the writeups are public.”
Fifteen minutes is shorter than most change approval meetings.
The AI angle
This blog is mostly about AI, and PHP2Shell is as much an AI story as a PHP story.
The bug class is old. Sansec traces related PHP memory-limit issues back to 2004, plus a 2020 bug report and a 2024 audit finding, none of which were shown to be exploitable. What changed is the cost of turning a fragile memory bug into a reliable exploit. Wiz says its team used frontier models, including GPT-5.6 Sol and Gemini 4 Argon, for discovery, exploit development and patch validation, and that the models helped adapt the exploit across PHP versions, configurations and memory layouts. In Wiz’s words: “Frontier AI models substantially reduced that barrier, turning a longstanding flaw into an exploit.”
Their timeline shows how fast that goes: first bug on August 19, unauthenticated code execution against Drupal on August 20, and against WordPress on August 21.
Attackers have the same tools. When decade-old bugs can be weaponized in days and patches can be reverse engineered in minutes, how fast you patch is a security control in its own right.
What to update to
PHP released fixes in:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35 (8.2 reaches end of life on December 31, 2026, so plan your next upgrade too)
PHP 8.1 and older no longer get official releases. Given the severity, the PHP team published minimal source backports for 7.4, 8.0 and 8.1 for people who build from source, and Linux distributions and LTS vendors received the patches in advance, so check your distro for updated packages. One catch: PHP says the volunteer-run rpms.remirepo.net repository won’t have updates today. If you depend on it, switch to distribution packages or build from source.
cPanel has shipped its fix
If your sites run on cPanel & WHM, a release on php.net doesn’t reach you directly. cPanel builds its own PHP packages through EasyApache 4, so you’re waiting on cPanel.
That wait is over. cPanel released EasyApache 4 25.91 today, October 21. Its release notes say it “fixes two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619) in ea-php74 through ea-php85.” That includes the end-of-life 7.4, 8.0 and 8.1 builds, which is good news for anyone with older sites on a cPanel box. The same release also patches ea-libcurl for 14 vulnerabilities and updates ea-nginx, ea-nginx-njs and ea-modsec30.
If you manage the server, EasyApache 4 packages come through the system package manager. As root:
# AlmaLinux, Rocky Linux, CloudLinux
dnf update 'ea-*'
# Ubuntu
apt update && apt upgrade
Then restart PHP-FPM and Apache so no worker keeps running the old code:
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd
To confirm the update landed, rpm -qa --last 'ea-php*' | head lists the most recently installed packages (on Ubuntu, check /var/log/dpkg.log). For ea-php74, 80 and 81 the version number won’t change, because cPanel backported the fix, so look at the install date rather than php -v. If the server also has PHP from somewhere else, such as CloudLinux alt-php or a hand-built binary, update that separately.
If you’re on shared hosting, you can’t patch PHP yourself. Ask your host whether EasyApache 4 25.91 is installed, and use MultiPHP Manager in cPanel to check which PHP version each of your domains runs. A domain pinned to an old version needs the patched build as much as the server default does.
What you risk by waiting
Remote code execution with no login is about as bad as web vulnerabilities get. If you hold off, here is what’s on the table:
- Takeover of the site. The attacker runs commands as the PHP user and can read or change every file the site can, including config files with database passwords and API keys.
- Data theft. With the database credentials from
wp-config.phpor.env, customer records, orders, email addresses and password hashes are one query away. - Leaked secrets, even without code execution. CVE-2026-109618 can disclose memory from other requests. Wiz warns that can include passwords, session tokens and API keys belonging to your other visitors.
- Backdoors that outlive the patch. Attackers plant web shells, rogue admin accounts and cron jobs. Patching afterwards closes the door but doesn’t evict anyone already inside.
- Card skimming. For Magento, WooCommerce and Shopware stores, Sansec’s specialty, injecting a skimmer into checkout is a classic next step.
- Your server becomes someone else’s infrastructure. Mass exploitation waves are followed by spam, phishing pages, SEO spam, cryptominers and botnet nodes, and your domain’s reputation pays for it.
- Your neighbours. On shared hosting, one compromised account can be the foothold for attacking other sites on the same server.
- Legal and customer fallout. A breach of personal data can trigger notification duties under privacy laws such as PIPEDA or GDPR, on top of incident response costs and lost trust.
The long tail is the larger concern. Forensics instructor Hal Pomeranz warned about the forgotten and embedded PHP apps nobody remembers to patch, and the UK’s NCSC is urging organizations to consider taking offline any system they can’t fix right away.
If you can’t patch this minute
PHP is clear that only the update fixes this: “There are no complete mitigations, updating is the only safe choice.” If you need a few hours, these reduce exposure without making you safe:
- Put the site behind a WAF with PHP2Shell rules. Cloudflare pushed rules to every plan, including free, and calls them a stopgap. Lock the origin down to Cloudflare’s IP ranges so attackers can’t go around it.
- Set
session.upload_progress.enabled = 0inphp.inior the FPM pool, then restart every worker. This is the stopgap Firsov posted, and it blocks the confirmed session paths for CVE-2026-109619 only. Don’t rely onini_set()or.user.ini. On cPanel, use the MultiPHP INI Editor or/opt/cpanel/ea-phpNN/root/etc/php.ini. - Lower
post_max_size: 8M if the site takes no uploads, 32M if it does, withupload_max_filesizebelow it. - On PHP 8.5, set
fatal_error_backtraces = 0and restart workers. - If none of that is possible, take the site offline until it’s patched.
PHP also lists memory_limit = -1 for CVE-2026-109618, but that lets a single request eat all of the server’s memory, so only use it with a container or cgroup limit around PHP.
Check whether you were hit
If a server was exposed before you patched, check it rather than assume it’s clean. Wiz and Sansec suggest looking for:
- unusual multipart requests followed by memory-limit errors or bursts of HTTP 500s
- unusually large or malformed
PHPSESSIDcookies - PHP workers restarting or churning for no clear reason
Wiz notes application logs may show little because the attack happens below the application, so check web server and PHP-FPM logs too. Then look for the usual signs of a break-in: new or recently changed PHP files (on cPanel, find /home/*/public_html -name '*.php' -newermt 2026-10-20 is a quick start), new admin users, unfamiliar cron jobs and unexpected outbound connections. If you find something, treat it as an incident: restore from a clean backup and rotate database passwords, API keys and application secrets.
The short version
- Find every PHP install you’re responsible for, including the forgotten ones.
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install EasyApache 4 25.91 on cPanel.
- Restart PHP-FPM and Apache so no worker runs old code.
- Confirm the new packages are actually in place.
- Check anything that was exposed before the patch for signs of compromise.
- Get off PHP 8.1 and older, and put 8.2’s end of life on the calendar.
Firsov’s warning turned out to be an understatement. The comparisons to Log4Shell are already flying, and the sites that come out of this fine will be the ones that patched today.
Sources
- PHP security advisory and release announcements (php.net, October 20 and 21)
- PHP advisory GHSA-w8hw-w9fx-j79w: RCE via OOM corruption
- PHP advisory GHSA-6wmf-4rv5-p3rp: RCE via stale global state
- cPanel release notes: EasyApache 4 25.91
- Kirill Firsov on X: “php2shell. Tomorrow is a helluva day.”
- Kirill Firsov on X: temporary mitigation
- PHP2Shell on Wikipedia
- Wiz: PHP2Shell, AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
- Sansec: PHP2Shell research and mitigations
- Ars Technica: PHP warns it plans to release 2 emergency patches imminently
- SecurityWeek: PHP2Shell, mass exploitation looms for leaked critical PHP flaws
- Help Net Security: PHP2Shell, critical PHP vulnerabilities patched