TL;DR: The 2026 PHP vulnerability, nicknamed PHP2Shell, is two critical flaws in PHP that can let an attacker run their own code on a web server without logging in. PHP fixed them on 21 October 2026 in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. If your website runs on WordPress or anything else built with PHP, the fix has to be applied to PHP on your server. Updating WordPress or its plugins does not fix it. Ask your host or developer today which PHP version you’re on.
On 21 October 2026, the PHP project shipped emergency updates for two vulnerabilities in the PHP language itself. Government agencies, including the US National Security Agency and the UK National Cyber Security Centre, told organisations to patch or, if they couldn’t, take their PHP systems offline. Singapore’s Cyber Security Agency (CSA) issued its own alert the same day.
If your business has a website, check your PHP version today.
Facts checked on 23 October 2026 against php.net, the PHP Foundation and CSA Singapore. Sources are listed at the end.
What is the PHP vulnerability (PHP2Shell)?
PHP2Shell is the name given to two critical vulnerabilities in PHP, tracked as CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 out of 10 on the CVSS v4.0 severity scale. According to PHP and CSA, both can allow an attacker who isn’t logged in to run code on the server.
Wiz, one of the firms that found the flaws, wrote that under the right conditions attackers could take control of affected servers and steal sensitive data, as reported by the BBC. The BBC also reported that the NSA said the flaw could give a direct path into a system’s database.
The two flaws work differently:
- CVE-2026-109618 (out-of-memory handling). If a request hits PHP’s memory limit at exactly the wrong moment, PHP can leave half-built internal data behind and later treat it as valid. On Apache with mod_php, the PHP Foundation says this can be triggered before any of the site’s own code runs.
- CVE-2026-109619 (stale state after an error). An error at the wrong point can leave PHP holding on to memory from a previous request. A later request handled by the same worker can then use that freed memory.
Both sit in parts of PHP that nearly every web request touches, according to the PHP Foundation.
Why it affects so many websites
W3Techs reports PHP is used by 69.3% of websites whose server-side language it can detect. The BBC lists WordPress, Wikipedia and online shops among the platforms built on it.
WordPress security alerts are usually about one plugin or theme. This time the flaw is in the language underneath all of them, which, as SiteGround points out, reaches much further. PHP says the risk applies to all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. CSA’s alert says the vulnerabilities affect all versions of PHP.
What happened, and when

The PHP Foundation has published a detailed account of how the flaws were found and fixed:
- 2024: During PHP’s first external security audit in years, a PHP core developer found the first signs of the memory problem behind CVE-2026-109618. No clear way to exploit it was found at the time, and the fix stalled. The Foundation calls that delay “a structural failure”.
- 11 August 2026: A researcher at security firm Calif reported a working remote code execution with the same root cause. OpenAI and Wiz reported related attack paths in the following weeks.
- 20 October 2026: The CVE numbers leaked online before the planned release. PHP brought its announcement forward and moved the release up by a day.
- 21 October 2026, 14:00 UTC (10pm in Singapore): PHP released the fixed versions.
The researchers used AI tools to analyse PHP’s code. The PHP Foundation says AI-assisted research now sends it far more reports than before, and that a person still makes every call and works on every patch.
How serious is it right now?
Attacks started fast. CSA reports widespread exploitation attempts and several proof-of-concept exploits already in circulation.
The BBC reported that Cloudflare’s chief executive, Matthew Prince, saw attempts climb from thousands before the announcement to millions afterwards. Amazon told the BBC it was targeted days before disclosure, and its sites kept running normally.
Official advice has been blunt. As reported by the BBC:
- The US National Security Agency told organisations that can’t patch immediately to take their PHP systems offline.
- The UK National Cyber Security Centre gave similar advice and told organisations to check for backdoors left by attackers.
- Agencies in the EU, Singapore and Australia issued similar alerts.
Which PHP versions are fixed?

| Your PHP branch | Fixed version | Notes |
|---|---|---|
| PHP 8.5 | 8.5.12 | Fixed |
| PHP 8.4 | 8.4.27 | Fixed |
| PHP 8.3 | 8.3.36 | Fixed |
| PHP 8.2 | 8.2.35 | Fixed. PHP 8.2 stops getting security fixes after 31 December 2026, so plan your upgrade |
| PHP 8.1, 8.0, 7.4 | No official release | PHP published minimal source patches for people who build PHP themselves. Some Linux distributions and long-term support vendors offer backported fixes. Otherwise, upgrade to a supported version |
| Older than 7.4 | None | Upgrade |
The version number has to match exactly. “PHP 8.3” isn’t enough; you need 8.3.36 or later. Your host may also ship its own patched build with a different number, so if in doubt, ask them to confirm in writing that the PHP2Shell fix is applied.
What should you do?
What you need to do depends on who looks after your server.
If a hosting company or web agency manages your site
Contact them today. Ask two questions: which exact PHP version is your site running, and has the fix for CVE-2026-109618 and CVE-2026-109619 been applied?
Some hosts have already acted. SiteGround, for example, says it put protective measures in place across its servers before the release and applied PHP’s official fixes the same day, with nothing for its customers to do. Don’t assume yours has done the same. Check its status page or ask support.
If you run your own server or VPS
Update PHP to a fixed version now, then restart PHP-FPM or Apache so the new version is in use. Linux distributions received the patches in advance, so check your distribution for updated packages. PHP notes that the volunteer-run remirepo repository did not have updates on release day, and recommends switching to distribution packages or building from source.
If you’re not sure who manages it
On a WordPress site, go to Tools > Site Health > Info in your dashboard. The Server section lists your server’s PHP details, including the version. Write down the full number, then check it against the table above.
If you don’t know who your host is, or the version is older than the fixed release, treat it as urgent.
If you can’t update straight away
PHP is clear that only an update fully fixes this. It has published temporary measures that reduce exposure to specific attack paths, such as changes to memory limits, upload sizes and session upload progress settings. These are server settings for your developer or host, and PHP warns they don’t make a site safe on their own. The full list is in PHP’s security advisory.
If neither an update nor those measures can go in quickly, the UK NCSC and Japan’s Prime Minister, both quoted by the BBC, suggested taking the site offline temporarily. That’s a call to make with your host or developer.
What CSA Singapore advises
CSA’s alert (AL-2026-151, last updated 22 October 2026) tells organisations to:
- Update PHP to the latest versions immediately.
- Find every system running any version of PHP, starting with internet-facing ones.
- Check whether PHP is installed on web servers through third-party applications or components, even if the main website doesn’t use PHP.
- Keep monitoring PHP’s official guidance for updates.
That third point matters for smaller businesses. A booking system, a customer portal or an old microsite set up years ago may run PHP even if your main site doesn’t.
After you’ve patched
Patching doesn’t tell you whether anyone got in first. Amazon and Cloudflare both saw attempts before the public release, and the UK NCSC advises checking for backdoors. Ask your developer or host to:
- Look for unfamiliar files, admin users or scheduled tasks, especially any added around the disclosure dates.
- Check server and access logs around the disclosure dates.
- Make sure you have a clean, recent backup.
And watch your inbox. The BBC quotes a UNSW Sydney researcher warning about phishing that uses the news as bait. Be wary of any “urgent PHP update” email asking you to click a link or log in.
What this means for website visitors
If you only visit websites, you mostly don’t need to do anything. This is a server problem. Follow any security advice the sites you use send out, such as a request to change your password, and be careful with emails about the incident.
Need a hand checking your site?
If you’re not sure which PHP version your site runs or who’s responsible for updating it, talk to us. Our website maintenance plans include security patches as they’re released, and for sites we don’t yet look after, we consider one-off emergency fixes case by case. Contact our team and we can help you check where you stand.
Sources
- PHP, Security advisory: Critical remote code execution vulnerabilities, update now, 21 October 2026
- The PHP Foundation, Today’s PHP Security Release, and How We’re Strengthening PHP Security, 21 October 2026
- Cyber Security Agency of Singapore, Critical Vulnerabilities in PHP (PHP2Shell), 21 October 2026, updated 22 October 2026
- BBC News, What is PHP and why did it spark a global cyber-security scramble?, 22 October 2026
- SiteGround, Critical PHP vulnerabilities: SiteGround sites protected, updated 22 October 2026
- W3Techs, Usage statistics of PHP for websites, checked 23 October 2026
- WordPress.org, Site Health screen
