
Most PHP security bugs live in our own code. In October 2026, the most serious one lived inside PHP itself.
On 21 October 2026, the PHP team shipped emergency releases for two critical remote code execution (RCE) flaws, CVE-2026-109618 and CVE-2026-109619. Together they are called PHP2Shell, and both are rated 9.2 out of 10 on CVSS v4.0. Attack attempts were spotted even before the patch came out, so if your website runs on PHP, this is not a "later" task.
This guide explains what PHP2Shell is in plain language, who is affected, how to fix it, and how to check that your site was not already hit.
Quick summary
PHP2Shell is the nickname for two critical bugs in the PHP runtime, the engine that runs PHP websites. The bugs are not in any one app's code. That is what makes them serious: a perfectly written website is still exposed if it runs on a vulnerable PHP version.
The flaws date back to PHP 5.4, released in 2012, so they sat unnoticed for about 14 years. Researchers from Wiz, Calif.io, Quarkslab and OpenAI are credited with reporting them.
| Date (2026) | What happened |
|---|---|
| 23 Oct | PHP Foundation reserves CVE-2026-115560 for a third, related RCE flaw. Its fix will come in the next regular release. |
| 22 Oct | Free scanners appear to test whether a server is exposed. |
| 21 Oct | PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 with the fixes. |
| 20 Oct | PHP posts advance notice of a critical security release. |
| 17 Oct | Amazon threat intelligence detects exploitation attempts, four days before disclosure. |
Some government and large company sites, including in Australia, were briefly taken offline while teams patched.
CVE-2026-109618: the out-of-memory problem. When a request runs out of memory, PHP can stop halfway and leave its internal data half-filled. A chain of weaknesses lets an attacker turn that broken state into running their own code, with the same rights as the web server's PHP worker. Researchers showed it working without a login against WordPress, Drupal, and Joomla.
CVE-2026-109619: the leftover data problem. PHP keeps some global data between requests. This bug leaves references pointing at memory that was already freed (a "use-after-free"). An attacker can use it to leak memory from the server or run code.
In both cases, the attack path runs through file upload handling (multipart form requests), which nearly every PHP setup accepts by default. Once attackers have code running, they can usually read, change or dump the database behind the site.
Yes, but only if you update. The fix exists in the patched releases; it does not reach your server on its own.
Three things to keep in mind:
PHP powers roughly 70% of websites whose server technology is known, so the exposure is huge. Your site is likely at risk if all of these are true:
Also watch for warning signs: spam pages you did not create, unexpected redirects, browser security warnings, or a sudden spike in server errors.
Businesses running SaaS products, membership sites, ecommerce stores, and finance or lending portals on older PHP versions should treat this as a priority.
The patch teaches PHP to clean up properly when something goes wrong. If a request runs out of memory, PHP now stops it safely instead of leaving half-finished data behind. It also clears leftover data at the end of each request, so the next request can never reuse it.
| Your PHP version | Update to |
|---|---|
| PHP 8.5 | 8.5.12 or later |
| PHP 8.4 | 8.4.27 or later |
| PHP 8.3 | 8.3.36 or later |
| PHP 8.2 | 8.2.35 or later (8.2 reaches end of life on 31 December 2026) |
| PHP 8.1 or older | Upgrade to a supported branch, or get a patched build from your OS vendor or host |
php -v on the server or check your hosting control panel. Remember that the web server and the command line can use different PHP versions.A patch closes the door, but it does not remove anyone who got in earlier. Since attacks started before disclosure, take a few minutes to check:
If you find anything suspicious, rotate database passwords, API keys and admin credentials, and restore from a clean backup if needed.
Remote code execution means an attacker sends a request and your server runs their code. From there they no longer need a password; they effectively own the server.
PHP2Shell is rare because the bug was in PHP itself. Most RCE bugs come from app code that trusts user input too much. The usual suspects:
Patching PHP fixes PHP2Shell. Fixing these patterns in your own code closes the next door.
A bug hiding in PHP's core for 14 years was found with help from teams that include an AI lab. That is the new normal: AI tools are getting better at finding deep bugs, for defenders and attackers alike. The gap between disclosure and real attacks is shrinking, and in this case attacks came first.
The practical lesson is simple. Keep your runtime and dependencies on supported versions, and have a plan to patch within days, not months.
Techiebutler's PHP and Laravel engineers help businesses upgrade legacy PHP versions, patch critical vulnerabilities, and harden their apps without breaking what already works. Whether you run WordPress, Magento or a custom PHP platform, talk to our team for a quick security and upgrade review.
PHP2Shell is the name for two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that can let an attacker run code on a PHP server without logging in.