PHP2Shell: The PHP Vulnerability Behind Most of the Web

PHP2Shell: The PHP Vulnerability Behind Most of the Web
On Wednesday, the FBI, CISA and the UK's National Cyber Security Centre gave website owners blunt advice about a new PHP vulnerability: if you can't fix it fast, take it offline [R4][R5][R6]. The Dutch Parliament did. So did parts of Wikipedia [R12].
If your website runs on WordPress, this is about you. And the fix isn't the "Update WordPress" button you're used to clicking.
Key takeaways
- PHP2Shell is two critical flaws in PHP, the software underneath WordPress and most of the web, that let an attacker take over a server with one anonymous web request [R1][R7].
- Updating WordPress or your plugins does not fix PHP2Shell. WordPress.org says no WordPress update is required or planned [R31][R15].
- The only fix is updating PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 [R1].
- PHP 8.1 and older get no official release, only bare-bones source patches [R1][R3]. Among exposed servers with a visible version, 59% are on a version with no official fix [R14].
- Keeping PHP current is routine maintenance, like servicing a car: a defined task, not a crisis project.
What is the PHP2Shell vulnerability?
PHP2Shell is the nickname for two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, that let a stranger run their own commands on your server without logging in [R1][R7].
Both flaws score 9.2 out of 10 for severity, and the PHP project shipped emergency fixes on 21 October 2026 [R1]. Every PHP version from 5.4 to 8.5.11 is affected [R3].
Two teams found the flaws in August. Researchers at the security firm Calif used one of OpenAI's AI models [R9]. Wiz, a cloud-security company, got there on its own [R9][R10]. Then the details leaked online on 20 October, the day before the fix shipped [R29].
CISA's advice: if you can't update right away, or you run 8.1 or older, take PHP-based systems offline [R4]. The FBI said the same, and the NCSC said to consider going offline if you can't put temporary protections in place quickly [R5][R6]. The PHP project didn't soften it either. "There are no complete mitigations, updating is the only safe choice" [R1].
How the PHP2Shell attack works, in plain English
Picture a hotel where housekeeping sometimes skips a room. The next guest walks in and finds the last guest's things still there. That's roughly the second flaw. PHP leaves data behind after one visitor leaves, and the next visitor's request can pick it up [R2].
The first flaw kicks in when PHP runs out of memory halfway through setting up a request. The cleanup step then trusts the half-built pieces as if they were finished, like a crew trusting scaffolding nobody completed [R2].
Here's the part that matters for you. The attack fires before WordPress even starts, so it's an unlocked front door to the whole building, not a weak lock on one room [R2][R7]. That's why updating WordPress or your plugins changes nothing [R31][R15]. Wiz showed full takeovers of WordPress, Drupal and Joomla sites [R10].
Is anyone actually attacking? The accounts conflict. CISA hadn't seen exploitation when it published [R4], and as of 22 October the flaws weren't on its list of known-exploited bugs [R8]. But Amazon logged an attempt on 17 October, before the fix was even public [R7]. It later said the flaws were "now being broadly exploited in the wild" [R6]. Cloudflare's CEO reported hundreds of thousands of attempts within two hours [R15]. I'd assume someone has already tried your door.
Why does one PHP vulnerability hit most of the web?
PHP runs on 69.3% of websites whose server language is known [R16]. WordPress is the single biggest reason. It alone powers 39.6% of all websites [R17]. Add cheap shared hosting, long-lived servers and an "install once, update never" habit [R24], and you get a lot of old PHP that nobody looks at.
The language nobody planned
I'll say it plainly. PHP was never designed. It piled up.
It started in 1995 as "Personal Home Page Tools" [R20], a small kit Rasmus Lerdorf built for his own use. He's honest about it: "I had no intention of writing a language. I didn't have a clue how to write a language. I didn't want to write a language" [R25]. He wanted "to solve a problem of churning out Web applications very, very fast" [R25]. Then people "wanted to do everything in the stupid little templating language I had written, all their business logic" [R20].
So PHP grew like a house where every owner adds a room and nobody keeps the plans [R20]. You can see it in the names. Some built-in commands use underscores and some don't, and two search commands take their inputs in opposite order [R27]. A well-known 2012 critique called PHP "a fractal of bad design" [R27]. Even Lerdorf, talking about web security, said "I fully take the blame for some of it, but not all of it" [R26].
Fair is fair, though. Modern PHP is a different animal. PHP 8, released in November 2020, brought real modern features [R23], and 89% of PHP-focused developers now use it [R22]. In 2021, ten companies, including JetBrains and WordPress.com's owner Automattic, formed the PHP Foundation to pay for its upkeep [R21].
Then this week happened. The Foundation's own verdict on how long the fix took: "We won't pretend otherwise: the delay was a structural failure." It blamed how its security team makes decisions, and a lack of resources [R11]. The language got better. The money and people behind it didn't keep pace.
How to fix it: patching PHP is maintenance, not heroics
Most of the damage will land on sites nobody was looking after. About 35% of PHP sites run PHP 7 or older, versions that stopped getting security fixes years ago [R18]. Of exposed servers with a visible version, 59% had no official fix for PHP2Shell [R14]. The next deadline is already set. PHP 8.2 stops getting security fixes on 31 December 2026 [R19].
A car recall isn't a crisis if you get the car serviced. Upgrading PHP is a well-defined task: check the version, test the site on the new one, switch over, confirm nothing broke. It's not a rebuild.
If nobody on your side does this, hand it over. yousource Dev on Demand works task by task, with a 3-day turnaround per task, and a PHP patch or version upgrade is one task. Check your PHP version today. Then book the next upgrade before 31 December, when 8.2 runs out.
Frequently asked questions
Do I need to update WordPress to fix PHP2Shell?
Keep updating WordPress, but it won't fix this. WordPress.org says no WordPress update is required or planned for PHP2Shell [R31][R15]. The fix is updating PHP itself to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 [R1].
How do I know which PHP version my site runs?
Your hosting company sets it, so your host's control panel usually shows it [R30]. In WordPress, Tools > Site Health > Info > Server lists it [R31].
Should I really take my site offline?
CISA says yes if you can't update right away or run PHP 8.1 or older [R4]. The FBI says the same if an immediate update isn't possible [R6], and the NCSC says to consider it if you can't apply temporary fixes quickly [R5]. A few hours offline costs less than a stolen database.
Is PHP2Shell being exploited?
Reports conflict. CISA had not seen exploitation when it published its alert [R4]. Amazon logged an attempt on 17 October and later said the flaws were "now being broadly exploited in the wild" [R7][R6].
Is PHP safe to keep using?
Yes, if it's maintained. Supported PHP versions are patched [R1][R19], and most PHP developers already run version 8 [R22]. The danger is unmaintained PHP, not PHP.
Sources
- [R1] PHP project security release: two CVEs, 9.2 severity, fixed versions, "no complete mitigations" — https://www.php.net/
- [R2] PHP project advisory: root causes (out-of-memory corruption; stale leftover state), fires before app code — https://www.php.net/
- [R3] Google Cloud: affected range PHP 5.4–8.5.11; 8.1 and earlier get no fix — https://cloud.google.com/
blog/ products/ identity-security/ responding-to-core-php-vulnerabilities-cve-2026-109618-cve-2026-109619 - [R4] CISA alert: take PHP systems offline if you can't update; no exploitation seen at publication — https://www.cisa.gov/
news-events/ alerts/ 2026/ 10/ 21/ critical-vulnerabilities-php-require-immediate-patching - [R5] UK NCSC: consider taking the system offline — https://www.ncsc.gov.uk/
news/ critical-security-issue-affecting-php - [R6] ABC News: FBI offline advice; Amazon "broadly exploited"; PHP Foundation "structural failure" — https://abcnews.com/
Technology/ urgent-security-fix-issued-code-vital-estimated-70/ story?id=137447718 - [R7] Help Net Security: Amazon logged an attempt on 17 Oct; one unauthenticated request — https://www.helpnetsecurity.com/
2026/ 10/ 21/ php2shell-php-vulnerabilities-patched-cve-2026-109618-cve-2026-109619/ - [R8] watchTowr: not on CISA's known-exploited list as of 22 Oct — https://watchtowr.com/
intelligence/ php-cve-2026-109618-faq/ - [R9] The Next Web: Calif found the flaws with an OpenAI model; Wiz independently — https://thenextweb.com/
news/ php2shell-php-rce-ai-openai-wiz - [R10] Wiz: takeovers shown on WordPress, Drupal, Joomla; memory leaks expose secrets — https://www.wiz.io/
blog/ php2shell-php-rce - [R11] Gizmodo: PHP Foundation "structural failure" — https://gizmodo.com/
expect-mass-attacks-within-15-minutes-hackers-poised-to-exploit-newly-discovered-website-flaws-2000828878 - [R12] Ara: Dutch Parliament site offline; Wikipedia disabled systems — https://es.ara.cat/
internacional/ europa/ diversos-gobiernos-europeos-desconectan-webs-riesgo-ciberataques_1_5886506.html - [R14] CybelAngel: 59% of versioned exposed PHP hosts on a branch with no official fix — https://cybelangel.com/
ar/ %d9%85%d8%af%d9%88%d9%86%d8%a9/ critical-php-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619/ - [R15] Codeable: no WordPress update required; Cloudflare CEO on attempts within two hours — https://www.codeable.io/
blog/ php-vulnerability-cve-2026-109618/ - [R16] W3Techs: PHP used by 69.3% of websites with a known server-side language — https://w3techs.com/
technologies/ overview/ programming_language - [R17] W3Techs: WordPress powers 39.6% of all websites — https://w3techs.com/
technologies/ overview/ content_management - [R18] W3Techs: PHP sites by version, ~35% on PHP 7 or older — https://w3techs.com/
technologies/ details/ pl-php - [R19] PHP supported versions: 8.2 security support ends 31 Dec 2026 — https://www.php.net/
supported-versions.php - [R20] The Register, 25 years of PHP: "Personal Home Page Tools", Lerdorf "templating language" quote, organic growth — https://www.theregister.com/
2020/ 06/ 08/ 25_years_of_php/ - [R21] The Register: PHP Foundation formed by ten companies — https://www.theregister.com/
2021/ 11/ 23/ php_foundation_formed_to_fund/ - [R22] Laravel News on JetBrains State of PHP 2025: 89% use PHP 8 — https://laravel-news.com/
jetbrains-state-of-php-2025 - [R23] Auth0: what's new in PHP 8 — https://auth0.com/
blog/ whats-new-php-8/ - [R24] Mattias Geniar: why old PHP versions persist — https://ma.ttias.be/
why-were-still-seeing-php-5-3-in-the-wild-or-php-versions-a-history/ - [R25] Computerworld: Lerdorf, "I had no intention of writing a language" — https://www.computerworld.com/
article/ 1420421/ php-creator-extolls-language-s-modest-start.html - [R26] IT Writing: Lerdorf, "I fully take the blame for some of it" — https://www.itwriting.com/
blog/ 138-rasmus-lerdorf-on-security-hormones-and-php.html - [R27] Eevee, "PHP: a fractal of bad design" (naming and argument-order examples) — https://eev.ee/
blog/ 2012/ 04/ 09/ php-a-fractal-of-bad-design/ - [R29] Infosecurity Magazine: embargoed details leaked on 20 October — https://www.infosecurity-magazine.com/
news/ critical-php-vulnerabilities-leaked/ - [R30] Learn WordPress: the host sets the PHP version; Site Health — https://learn.wordpress.org/
tutorial/ tools-site-health/ - [R31] WordPress.org: no WordPress update required or planned; Site Health path to PHP version — https://wordpress.org/
news/ 2026/ 10/ critical-php-security-release/