PHP2Shell — Critical PHP Flaws Let Attackers Take Over Web Servers (2026)
Two critical PHP flaws dubbed PHP2Shell (CVE-2026-109618, CVE-2026-109619) let attackers run code on web servers without logging in. Patches arrived October 21, 2026 — attacks started days earlier.
What Is This Threat?
On October 21, 2026, the PHP project released emergency security updates for two critical vulnerabilities in the PHP language itself, nicknamed PHP2Shell:
Both are rated 9.2 out of 10 (Critical). Together they allow unauthenticated remote code execution: an attacker who can send a web request to a vulnerable server may be able to run their own commands on it — no password, no account, and no help from the website's own code required.
PHP powers a large share of the web, including WordPress, Drupal, Joomla, Magento, Laravel apps, and countless shop systems and customer portals. Palo Alto Networks counted more than 22 million internet-facing PHP instances that are potentially exposed.
Timeline
| Date | Event |
|---|---|
| October 17, 2026 | Amazon's honeypots record a first exploitation attempt — four days before the flaws were public |
| October 21, 2026 | PHP publishes the advisory and releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 |
| October 21, 2026 | Mass internet scanning begins within an hour; at least one European government takes its website offline as a precaution |
| October 22, 2026 | Cloudflare reports exploit attempts rising into the millions |
| October 23, 2026 | PHP warns of a related, lower-risk issue (CVE-2026-115560) affecting unusual session configurations; a fix will follow in the next regular release |
Who Is Affected?
Any PHP installation that answers web requests is in scope — whether it runs as Apache mod_php (the highest-risk setup), PHP-FPM, php-cgi, LiteSpeed, or FrankenPHP, including Docker containers that bundle their own PHP.
| PHP version | Status |
|---|---|
| 8.5 before 8.5.12 | Vulnerable — update to 8.5.12 |
| 8.4 before 8.4.27 | Vulnerable — update to 8.4.27 |
| 8.3 before 8.3.36 | Vulnerable — update to 8.3.36 |
| 8.2 before 8.2.35 | Vulnerable — update to 8.2.35 |
| 7.4, 8.0, 8.1 (end of life) | Vulnerable — no official release; only distribution packages or source backports |
| 7.3 and older | Vulnerable — no fix; upgrade required |
Linux distributions received the patches in advance, so updated packages are available through normal system updates. Some vendors backport fixes without changing the version number — check your distribution's advisory.
How Attackers Use It
Researchers note that building a reliable exploit is harder than first expected, and many attempts fail — but with millions of tries per day, unpatched servers will eventually be hit.
Why It Matters — Even If You Don't Run a Server
If you have a personal blog, small business website, or online shop on shared hosting, it almost certainly runs PHP. Hijacked websites are used to:
As a visitor, you can't patch someone else's server — but you can watch for signs that a familiar website has been tampered with.
Red Flags Checklist
For website owners:
sh, bash) or unknown programsFor website visitors:
How to Protect Yourself
- Update PHP immediately to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or your distribution's patched package), then restart all PHP workers and the web server
- On shared hosting or managed WordPress, ask your provider to confirm in writing that PHP2Shell patches are installed
- If you run PHP 8.1 or older, plan an upgrade to a supported version now — 7.3 and older will never receive a fix
- Until you can patch, restrict public access to the site and set session.upload_progress.enabled=0 as a temporary workaround — it reduces but does not remove the risk
- Put the website behind a web application firewall (WAF) that inspects large request bodies; major providers have released PHP2Shell rules
- Inventory every server, container image and internal tool that runs PHP, starting with internet-facing systems
- As a visitor, keep your browser updated and never install 'updates' or 'security tools' offered by a website pop-up
What to Do If Affected
- 1.If you suspect compromise, take the site offline or block public access before investigating
- 2.Patch PHP first, then check for web shells, unfamiliar PHP files, new admin accounts and unknown scheduled tasks (cron jobs)
- 3.Look for shells or unknown programs launched by web server or PHP processes, and review outbound connections from the server
- 4.Restore from a clean backup made before October 17, 2026 if you can't confirm the server is clean
- 5.Change all passwords and keys stored on the server — database credentials, API keys, CMS admin accounts and hosting logins
- 6.If customer data may have been accessed, follow your data-breach notification obligations (e.g. GDPR's 72-hour rule in the EU)
- 7.Report incidents to your national CERT (e.g. BSI in Germany, CERT.at in Austria, CISA in the US)