PHP2Shell: Critical PHP Flaw, What to Do | KarCrypto
News · Security · 2026

PHP2Shell: The Critical PHP Flaw Found With AI. Full Guide and What to Do Now

Fixes for two critical PHP flaws shipped on October 21, 2026. What is known, what is confirmed and what is not, and a step-by-step plan for site owners and crypto holders.

PHP2Shell: The Critical PHP Flaw Found With AI. Full Guide and What to Do Now
In short: on October 21, 2026 the PHP team shipped emergency releases for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619 (rated 9.2 out of 10), which can allow remote code execution without authentication. Fixed versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. What to do now: find out which PHP version your server runs, update it or ask your host to, apply the interim hardening settings if you cannot update yet, and rotate every secret stored on the server if it may have been hit. Only updating fully closes the holes.
PHP branchFixed versionWhat to do
8.58.5.12update
8.48.4.27update
8.38.3.36update
8.28.2.35update; the branch reaches end of life on December 31, 2026
8.1, 8.0, 7.4 and olderno official releasesget a backport from your distribution vendor or move to a supported branch

This guide covers what is known as of October 22, 2026, how the flaws work, what is confirmed and what is not, and what to do if you run a website, administer servers, or simply hold crypto. We rely on the CERT-EU advisory 2026-018, Patchstack, iTnews, CyberScoop, Imperva, Tenable and Brandefense. The situation changes every few hours, so check your host and distribution advisories before acting.

What happened and why everyone is talking about it

PHP is still the most widely used server-side language on the web. According to estimates cited by CyberScoop, it runs on 70 to 80 percent of sites with a known server-side language, including WordPress, Drupal, Joomla, Magento and Laravel. Both flaws sit in the interpreter itself, not in a particular CMS or plugin. It does not matter which framework you use: any site on an unpatched PHP is potentially affected.

The fixes landed on October 21, 2026, a day earlier than planned. According to iTnews and CyberScoop, the release was originally scheduled for October 22, but the CVE numbers and details leaked on social media and Hacker News, so the PHP team moved it up. Public proof-of-concept (PoC) code followed. Per Brandefense, the nickname PHP2Shell comes from a leaked exploitation tool.

One caveat about the headline figure "70% of websites": it refers to the share among sites where the server-side language can be identified, not 70% of the whole internet. And not every such site is exploitable in practice, because success depends on configuration and how PHP is run. Still, the scale is large: researchers cited by CyberScoop counted more than 1.3 million exposed hosts, and a Shodan search found about 1.9 million.

What are CVE-2026-109618 and CVE-2026-109619?

They are two flaws in PHP core, each scored 9.2 on CVSS v4.0. NVD lists 9.8 on CVSS 3.1, per Brandefense. Both can let an unauthenticated remote attacker run code on the server.

CVE-2026-109618 is memory corruption during out-of-memory handling. When request parsing, such as a multipart file upload, hits a memory limit, some data is left half initialised, and cleanup then frees memory that was never set up. CVE-2026-109619 is stale global state: request-owned data survives in a worker after its memory was freed, for example after a fatal error, and a later request on the same worker can use it.

According to Imperva, three mechanisms are involved: session upload progress tracking, the OPcache class cache, and backtrace generation on fatal errors. Three of the five exploitation techniques it describes use session upload progress as the remote trigger. Researchers rate attack complexity as high: the attacker needs precise timing and memory placement, and a failed attempt may just crash the worker. Even so, working exploits have been demonstrated against Apache with default PHP settings.

Who is affected: which setups are at risk

The PHP team says every installation that serves web requests is at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. It considers mod_php the most dangerous setup because an unauthenticated request can trigger the attack before any application code runs. The command line interface is not the main target, but you must check the PHP that serves your site: the CLI binary and the web server binary are often different.

All major branches are in scope. Wiz, as reported by Patchstack, says every PHP version back to 5.4 is affected by at least one of the issues, and Australia's ASD warned about PHP 5 and newer. Not every old release has been verified, so treat 8.1 and older as exposed until your vendor says otherwise. According to VirusTotal data cited by CyberScoop, about 758,000 servers that disclose their version run unsupported branches (5.4 through 8.1), compared with 272,000 on supported ones.

Who found the flaws, and what role did AI play?

The "AI found it" headline holds up in broad terms, with caveats. Per CyberScoop, the firm Calif found the flaw using OpenAI's GPT-5.6 Sol model, while Wiz independently discovered and reported it using GPT-5.6 Sol, its own Atlas tool and Google's Gemini 4 Argon. OpenAI frames this as a "defender's window": AI found the bugs before attackers did, giving the world time to prepare fixes. According to the timeline in Gigazine, Calif found the first flaw on August 1 and reported it to PHP on August 11 under OpenAI's "Patch the Planet" initiative, found the second on August 21, and Wiz found its flaw on August 19 and reported it on August 24. Sources differ on some dates, and how the work was split between people and AI has not been published.

What is not confirmed in the popular retelling: that "the bugs sat for ten years because humans thought them too hard to exploit, and AI cracked them in hours." Wiz does say AI lowers the barrier to exploiting old memory-safety bugs, but we found no publication confirming the "within hours" claim. For practical decisions, ignore the discovery story and focus on this: patches are out and exploit code is already being discussed publicly.

Is it being exploited in the wild?

The honest answer is that sources disagree, so assume the worst. Patchstack received reports of active exploitation from hosting partners on the morning of October 21, and Cloudflare reported early attack traffic. Hadrian says the flaws are exploited "at scale." On the other side, CISA had not observed exploitation at publication, neither CVE was in the KEV catalog on the evening of October 21, and Huntress saw no post-exploitation behavior on the Linux web servers it monitors. Patchstack's later telemetry showed mostly probing with no hard evidence of breaches. No public indicators of compromise (IOCs) existed at the time of writing.

A separate danger: vendors warn that unverified exploit code circulating online may contain malware. Do not download or run a PoC to "test" your server. It is the easiest way to compromise yourself.

What was actually taken offline, and what is unconfirmed

The popular retelling says government portals and retailers in Europe and Japan were shut down wholesale. In the sources we checked this is partly confirmed: Patchstack reports that several organisations took services offline as a precaution, including the Dutch government sites DigiD and MijnOverheid and The SEO Framework's servers. We found no mention of Japanese portals or retailers, so treat that part as unverified. The official guidance is confirmed: CERT-EU and the UK NCSC urged organisations to prepare for immediate patching and, where that is impossible, to isolate internet-facing PHP applications from public networks. Australia's ASD issued an unusual alert before the patch was even released.

Think funds were lost after a server breach?

Describe the situation on Telegram: we help preserve evidence and trace the movement of funds. No guarantee of recovery; results depend on circumstances.

Message us on Telegram

What a site owner should do right now: step by step

Work through these in order, most urgent first. Most of the effort is checking the version and calling your host.

Step 1. Find out which PHP serves your site. On a VPS or dedicated server run php -v and php-fpm -v and check which module is attached to the web server (for example apachectl -M | grep php). Remember that the CLI and the web server may use different versions. On shared hosting, open the control panel and look at the PHP version selector, or create a temporary phpinfo() file, open it and delete it immediately. Do not send "test" exploit requests to your own site.

Step 2. Update PHP. For branches 8.2 to 8.5 you need 8.2.35, 8.3.36, 8.4.27 or 8.5.12, or a vendor package carrying the fix. On Debian, Ubuntu and RHEL-family systems the update goes through the package manager (apt, dnf), and then you must restart PHP-FPM or the web server, otherwise running workers stay on the old code. According to Brandefense, fixed packages have already appeared for several distributions: for example Debian 13 with php8.4 8.4.27, RHEL 9 moving php:8.2 to 8.2.35, Ubuntu ESM and CloudLinux alt-php packages. Check your distribution's advisory for exact package numbers. For containers, rebuild the image on a fixed base and redeploy; updating the host does not touch them.

Step 3. On shared hosting, contact support. Ask when PHP will be updated and whether the PHP2Shell flaws are closed on their side. If not yet, switch your site to the newest version of your branch available in the panel and ask them to enable the protective settings below. If you are stuck on 7.4 or 8.0, plan a move to a supported branch: there are no official free fixes for it, only minimal source backports.

Step 4. If you cannot update immediately, apply interim measures. They reduce risk but do not make an installation safe. For CVE-2026-109618 vendors advise setting memory_limit=-1 at the admin level (so applications cannot override it), lowering post_max_size to 8M (32M if uploads are needed), keeping upload_max_filesize below it, enforcing request size limits at the web server or proxy, and using container or cgroup memory limits. Do not use RLIMIT_AS or RLIMIT_DATA. Note that removing the PHP memory limit without external limits can let a request exhaust server resources, so a container-level limit is essential. For CVE-2026-109619 set session.upload_progress.enabled=0 in php.ini, the FPM pool or server config, and restart all workers. On PHP 8.5 also set fatal_error_backtraces=0. Do not rely on ini_set() or .user.ini; they are not effective protection here. Imperva also suggests considering disabling OPcache after compatibility testing. Test your site before and after: file uploads and forms may behave differently.

Step 5. Add a layer of protection, but do not rely on it. Cloudflare deployed initial WAF rules for known exploit vectors for all customers, but it is a stopgap and only helps if your server accepts traffic exclusively through Cloudflare. A WAF does not fix PHP.

Step 6. If a server can be neither updated nor protected, isolate it. This is CERT-EU's direct recommendation: remove public access or take the site offline until the fix is verified. For a brochure site that is cheaper than a breach.

How do you know whether a server may already be compromised?

There are no public IOCs, so you have to rely on indirect signs. Wiz and Imperva suggest looking for unusual multipart requests with huge size or field counts followed by memory-limit errors or repeated HTTP 500 responses, unusually large or malformed PHPSESSID cookie values, and unexpected PHP worker restarts. Also check whether PHP processes spawn shells, interpreters or download tools, and whether new PHP files appeared in upload directories or the web root.

These signs prove neither compromise nor its absence. If you find them, act as for a breach: isolate the server, preserve logs, restore the site from a clean copy on patched PHP, and rotate every secret stored on the server. Researchers specifically warn that one technique discloses up to about 67 KB of process memory, so passwords and keys that were in memory should be treated as exposed.

Why this matters for crypto holders in particular

A typical web-infrastructure compromise works like this: through a flaw in a web application the attacker gains not money but access. From there several paths open up, and each one is worth checking if you run a PHP site or service.

First, keys and secrets on the server: exchange API keys, signing keys, RPC credentials, admin panel passwords, payment gateway tokens. If the server is compromised, all of them must be reissued. Exchange API keys with withdrawal permission are the most dangerous. Second, code tampering: a hacked site can start loading a script that swaps the recipient address at crypto checkout or shows visitors a fake wallet-connect form (a drainer). If you accept crypto payments, compare your payment details and payment page source with a known-good copy. Third, a seed phrase or private key stored on a web server. That must never happen under any circumstances, and today's events show why.

If you simply use crypto and run no site, your direct exposure is lower but not zero, since the services you use also run on PHP. The real threat today is phishing and scams riding the news. Expect messages like "urgently update your wallet because of the PHP vulnerability," fake "patches," and offers to download a "server checking tool." No PHP update ever requires your seed phrase. Open the services you need manually, review your wallet approvals, and if you already signed something suspicious, read our guide on checking a crypto wallet for a hack.

If you already lost funds after a breach

If funds disappeared after a server or site compromise, or you found swapped addresses, act quickly and in this order. First preserve evidence: addresses, transaction hashes, screenshots, server logs and incident time. Then revoke approvals and move what remains to a new wallet created on a clean device. After that, follow the step-by-step drainer response guide and file a report as described in where to report a crypto hack. The sooner the movement of funds is traced, the better the chance that part of them can be stopped at an exchange. Recovery can never be guaranteed; it depends on circumstances and on the decisions of exchanges and law enforcement. For urgent cases, see our emergency response service.

Checklist for today

For a site owner: identify the PHP version, update or get confirmation from your host, restart workers, enable the interim settings until then, review logs for the last few days, and rotate passwords and keys at the slightest suspicion. For an administrator: check containers, images, control panels and appliances that may also run PHP, and do not forget staging servers. For a crypto holder: never keep keys on servers, reissue exchange API keys if in doubt, and watch for phishing riding the news.

What not to do: install "fix plugins" from unverified sources, paste code snippets from chats, download exploits "to test your server," or leave the site unattended hoping your host will handle everything. And do not read "CVSS 9.2 but hard to exploit" as a reason to wait: PoCs are already discussed publicly, and AI lowers the barrier, as the researchers themselves say.

Frequently Asked Questions

What is PHP2Shell?
It is the nickname for two critical PHP core vulnerabilities, CVE-2026-109618 and CVE-2026-109619 (CVSS v4.0 9.2). They can allow code execution on a server without authentication. Fixes were released on October 21, 2026.
Which PHP versions are fixed?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. For 7.4, 8.0 and 8.1 the PHP team published minimal source backports, and ready-made packages must come from your distribution vendor.
Is my WordPress site affected?
Yes, if it runs on an unpatched PHP. The flaw is in the interpreter, not in WordPress or plugins. Updating WordPress itself does not close it; you need a new PHP version or a fixed package from your host.
Can I protect myself without updating?
Partly. Vendors advise disabling session.upload_progress, limiting request sizes and setting memory limits at the container level. That reduces risk, but only updating fully closes the vulnerabilities.
Is it already being exploited?
Reports conflict. Patchstack and Cloudflare saw attacks on October 21 and Hadrian reports exploitation at scale, while CISA and Huntress observed no exploitation at publication. Assume attacks are possible.
Did AI really find these flaws?
So CyberScoop and others report: Calif used OpenAI's GPT-5.6 Sol, and Wiz used GPT-5.6 Sol, its own Atlas tool and Gemini 4 Argon. The exact split of work between people and AI has not been published.
What if crypto disappeared after a server breach?
Preserve addresses and transaction hashes, revoke approvals, move the remainder to a new wallet, rotate keys and file a report. The sooner tracing starts, the better the chance of stopping part of the funds at an exchange. No guarantees.

Need to trace a transaction?

Share the TXID and wallet address. We run a full on-chain trace using Chainalysis Reactor and TRM Labs and tell you where the funds went.

BTC, ETH, BSC, TRC20, Polygon and more
Free initial assessment
Exchange freeze requests included
Legal evidence package for law enforcement
Tell us about your case
We reply on Telegram within 15 minutes
Transaction Not ReceivedAddress AnalysisExchange ReportOther
under $10K$10K-$100K$100K-$1M$1M+

NDA on request. Initial assessment is free.