PHP2Shell: Critical PHP Flaws, Safe Versions and What to Do

PHP is the programming language behind a large share of websites. In October 2026 its developers issued emergency fixes for two critical flaws that could let an attacker run code on a web server without logging in. A month later came another security release. This page was updated on 1 December 2026.
Which PHP version is safe now?
| PHP branch | 21 October fix (PHP2Shell) | 19 November release (update to this) |
|---|---|---|
| 8.5 | 8.5.12 | 8.5.13 |
| 8.4 | 8.4.27 | 8.4.28 |
| 8.3 | 8.3.36 | 8.3.37 |
| 8.2 | 8.2.35 | 8.2.36 |
PHP 8.1 and older no longer receive regular security updates from the project. Limited source backports of the October fixes were published for 7.4, 8.0 and 8.1. PHP 8.2 reaches the end of its life on 31 December 2026.
What are the two PHP2Shell flaws?
- CVE-2026-109618: remote code execution through memory corruption when PHP runs out of memory.
- CVE-2026-109619: remote code execution through leftover data from one request being reused by a later one.
Each is rated 9.2 out of 10 on the CVSS 4.0 severity scale. The risk is highest for servers running Apache with mod_php, where a request can trigger the flaw before any application code runs. PHP’s advice was that updating is the only safe choice.
Have they been attacked?
Yes. The US Cybersecurity and Infrastructure Security Agency (CISA) added both to its Known Exploited Vulnerabilities catalogue on 26 October, and the security firm watchTowr reports seeing attacks on both.
What was fixed on 19 November?
The November releases fix several more security problems, including CVE-2026-115560, a critical flaw linked to session upload progress that needs an unusual setup. The October versions do not fix it. No attacks on it had been reported at the time of release.
How AI found the bugs
The security company Calif found the first PHP2Shell flaw in August using an OpenAI model, during a code audit funded by OpenAI. Google’s Wiz says it found the flaws independently some weeks later, also with AI tools.
What this means for you
Website owners: If your site runs on PHP, including WordPress sites, check the version in your hosting control panel.
Developers and server teams: Update to the November releases or your Linux distribution’s patched packages, which may keep an older version number.
Anyone who patched late: Updating does not remove an intruder who is already inside. Review logs and look for unfamiliar files.
What to do next
- Check your PHP version today and update it.
- If you cannot update at once, ask your host what protection is in place.
Frequently asked questions
Does the October update protect my site fully?
It fixes PHP2Shell, but not the issues fixed on 19 November. Use the November release or later.
How do I check my PHP version?
Look in your hosting control panel, run php -v on the server, or check Site Health in WordPress. The web server may use a different version from the command line.
Related on Gistloom
Sources
- PHP rushes out emergency patches for two critical bugs AI found first (The Next Web)
- PHP2Shell: exploited remote code execution in PHP (watchTowr)
- PHP fixes 7 critical flaws (The Hacker News)
- PHP-ocalypse: How two critical web bugs almost broke the internet (TechCrunch)