PHP2Shell: How to Check If Your Site Is Patched (and What to Do)
PHP2Shell is the name for two critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, that can let an attacker run code on a web server without logging in. To check if your site is safe, find the PHP version it actually runs and compare it with the fixed releases, PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, out since Wednesday, October 21, 2026. If you're behind, or on PHP 8.1 or older, update or ask your host now; the 7 steps below show how.
Updating WordPress, your theme or your plugins won't fix this, because the bug sits in PHP, not in your site's code, as web host Hostinger points out. The PHP project says every PHP installation serving web requests is at risk, and that updating is the only complete fix.
What happened
The PHP project's security advisory rates both flaws 9.2 out of 10 (CVSS v4.0). One involves how PHP handles running out of memory mid-request; the other lets stale internal state from one request be reused by a later one. PHP says the risk is highest on Apache with mod_php, where an unauthenticated request can trigger a demonstrated exploit before any application code runs.
Advertisement
AI did much of the finding. OpenAI says security firm Calif found a critical flaw using GPT-5.6 Sol through its Patch the Planet program, calling it "one of the most impactful security issues in recent memory." Wiz Research says it found the bugs independently with help from Gemini 4 Argon, the Google model in our Gemini 4 Argon pricing guide. It showed unauthenticated code execution on WordPress, Drupal and Joomla, and says attackers could also read server memory holding passwords and API keys.
The disclosure didn't go to plan. According to the PHP Foundation, the CVE IDs began circulating online around 15:00 UTC on Tuesday, October 20, so PHP moved the release up a day to October 21 at 14:00 UTC. The Foundation adds that PHP was scanned earlier this year with Anthropic's Claude Mythos, the model behind the Anthropic OSS Scanner.
PHP2Shell fixed versions at a glance
Where each PHP branch stands, per PHP's advisory and Tenable.
| PHP branch | Fixed version | Notes |
|---|---|---|
| 8.5 | 8.5.12 | Released October 21, 2026 |
| 8.4 | 8.4.27 | Released October 21, 2026 |
| 8.3 | 8.3.36 | Released October 21, 2026 |
| 8.2 | 8.2.35 | 8.2 stops getting security fixes after December 31, 2026 |
| 7.4 to 8.1 | No official release | Minimal source backports only; ask your vendor or upgrade |
| 5.4 to 7.3 | No fix from the PHP project | Upgrade to a supported branch |
How to check if your site is patched: 7 steps
These steps follow guidance from PHP, national cyber security agencies, WordPress and web hosts. Where a step is our advice, we say so.
- Find out who runs PHP for your site. On managed hosting, your host runs PHP; on a VPS or your own server, you do. The Verge says Squarespace and Wix sites are in the clear, as they don't support PHP.
- Check your PHP version. On WordPress, WordPress.org says to go to Tools > Site Health, open the Info tab, expand Server and look for PHP version. On a server you manage, php -v prints the version, per the PHP manual. Our advice: command-line PHP can differ from what your web server uses, so check what the site reports.
- Compare it with the fixed releases. You need 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or newer on your branch. One catch: Switzerland's cyber security office says Linux distributions can backport fixes into existing package versions, so the exact package version and your provider's security notes decide. Hostinger says a PHP Info Build Date of October 21, 2026 or later means its customers are fixed.
- Update, or get your host to confirm. On managed hosting, get your provider to confirm the fix. On your own server, install your distribution's patched package or php.net's release. On PHP 8.1 or older, upgrade or get a vendor backport.
- Restart PHP. The Swiss office says to restart PHP services and long-running PHP processes after updating, rebuild containers, then verify the running site uses the patched version.
- Can't update today? Reduce exposure. PHP lists stopgaps that "do not make an installation safe": set session.upload_progress.enabled=0 in php.ini or the FPM pool (not via ini_set() or .user.ini) and restart every worker; on PHP 8.5, also set fatal_error_backtraces=0; and set a low post_max_size, such as 8M if you don't need uploads. The UK's NCSC says to consider taking systems offline if you can't mitigate quickly.
- Look for signs of an attack. Wiz flags unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, oversized or malformed PHPSESSID cookies, and unexplained PHP worker churn. The Swiss office adds crashes, modified files and unexpected processes, and warns an update doesn't undo a compromise. Our advice: if you find signs, rotate the passwords and API keys your server held, as in our OpenCode breach key-rotation guide.
What this means for you
- Managed hosting customers: Your host applies the fix. Hostinger says it finished rolling out patched PHP on October 22 at 06:44 UTC on all plans except VPS. Ask your host for its status.
- VPS and server owners: Update, restart, then check logs.
- Squarespace and Wix users: Not affected, according to The Verge.
- Everyday internet users: Not much to do, says The Verge, though hacked sites could spread malware.
Why it matters
- It's huge: W3Techs puts PHP on 69.3% of websites whose server-side language is known, as cited by The Verge and Tenable. Google says PHP 5.4 through 8.5.11 is vulnerable.
- Attacks are under way: Tenable says Amazon Threat Intelligence saw an exploitation attempt on October 17, four days before disclosure, and now calls PHP2Shell broadly exploited, advising investigations start from October 17. Cloudflare's Matthew Prince wrote on X that attempts on its network grew from thousands before the announcement to millions.
- AI changes the clock: Wiz says the bugs sat in PHP for over a decade before frontier models helped turn them into exploits. OpenAI expects similar findings to "increase sharply in the coming months."
Quick answers
Does updating WordPress fix PHP2Shell?
No. The flaw is in PHP itself, so only a patched PHP fixes it.
Is PHP 8.1 patched?
Not with an official release. PHP published minimal source backports for 7.4 to 8.1; otherwise upgrade to 8.2 or newer or use a vendor fix.
Is Cloudflare enough?
No. Cloudflare's WAF rules are free for all customers, but its CTO called them a stopgap only.
What's next
Google Cloud says it's rolling out patched serverless base images, but containers you build yourself must be rebuilt. Wiz says other variants of the bug exist, though PHP's patch fixes the issue at its core. PHP 8.6.0 RC4 includes the fixes, RC5 is planned for November 5, and PHP 8.2 reaches end of life on December 31, 2026.
FAQ
What is PHP2Shell?
PHP2Shell is the name researchers use for two critical memory-safety flaws in PHP, CVE-2026-109618 and CVE-2026-109619, each rated CVSS 9.2. They can let an unauthenticated attacker run code on a server running PHP.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released October 21, 2026. PHP 8.1 and older get no official release.
How do I check my PHP version in WordPress?
Go to Tools > Site Health, open the Info tab and expand Server to see PHP version. If your host backports fixes, ask it to confirm the patch.
Do I need to restart PHP after updating?
Yes. Switzerland's cyber security office says to restart PHP services and long-running PHP processes, and to rebuild containers.
Related reading
- OpenCode Breach: Saved OpenAI, Anthropic Keys May Be Exposed
- Anthropic OSS Scanner: Free Claude Mythos Bug Scans
- Gemini 4 Argon Pricing Guide: $2 Now, $4 From Dec 1
Sources
- PHP – Security advisory: Critical remote code execution vulnerabilities, update now
- The PHP Foundation – Today's PHP Security Release, and How We're Strengthening PHP Security
- Wiz Blog – PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
- OpenAI – Patch the Planet: global response coordination as agents uncover critical vulnerabilities
- Google Cloud Blog – Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619
- NCSC (UK) – Critical security issue affecting PHP
- Swiss Federal Office for Cyber Security – Critical vulnerabilities in PHP: Install security updates immediately
- Tenable – php2shell: Frequently asked questions about critical PHP remote code execution vulnerabilities
- The Verge – PHP: The three letters that shut down sites all over the internet today
- PHP Manual – Command line options
- WordPress.org – Get a faster, more secure website: update PHP today
- Hostinger – Hostinger deploys protections against php2shell PHP vulnerabilities
- Matthew Prince on X – Some stats on #php2shell

Comments
Post a Comment