Blog
Two critical PHP flaws let attackers
run their own code on web servers.
Two Critical Flaws in PHP Itself
On October 21, 2026, the PHP project pushed out emergency security releases to fix two critical vulnerabilities in PHP itself: CVE-2026-109618 and CVE-2026-109619, which the security press has nicknamed “PHP2Shell.” PHP is the programming language underneath WordPress, Drupal, Joomla, Magento and a huge share of the custom web applications on the internet, so a flaw in PHP is a flaw underneath all of them. Both bugs let an attacker who can reach a website send specially crafted web requests that end with the attacker’s own code running on the server. No password, no user account and no click from anyone is needed. The PHP team rates both 9.2 out of 10 on the CVSS v4.0 severity scale and is blunt about the fix: updating is the only complete one.
The release was rushed. On October 20 the CVE numbers leaked onto a public tech forum, and one of the research teams briefly posted a video of its working exploit by mistake, so the PHP team moved the release up by a day. Amazon’s threat intelligence team says its honeypots (decoy servers built to attract attackers) recorded a first exploitation attempt on October 17, four days before the public announcement. Since the release, Cloudflare, watchTowr and others have reported attack traffic, and Cloudflare says attackers are already reworking their payloads to slip past its firewall rules. As of this writing, those reports describe attempts rather than confirmed break-ins, but with the technical details now public, that window is closing fast.
Fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released October 21, 2026.
Both flaws are rated critical (9.2 of 10) and need no login, password or click.
Any site running PHP is in scope: WordPress, Drupal, Joomla, Magento and custom apps.
PHP 8.1 and older get no official release. Those servers need an upgrade plan now.
The Two Vulnerabilities, in Plain English
CVE-2026-109618: “RCE via OOM corruption.” Every PHP request gets a memory budget, and when a request blows past it, PHP stops that request on the spot. The flaw is in what happens next. If PHP is stopped while it is still unpacking the request, for example while reading a form or a file upload, the cleanup code can mistake half-built data for real data and act on memory the attacker filled. A carefully built upload request is enough to trigger it. On Apache with mod_php, the PHP team confirmed full remote code execution, triggered before any of the website’s own code had even started to run.
CVE-2026-109619: “RCE via stale global state.” To stay fast, PHP reuses the same worker processes for request after request. This flaw lets leftovers from one request, pointers to memory that has already been freed, survive into the next request handled by the same worker. An attacker sends one request designed to fail part-way through, then a second request that picks up the stale leftovers. The confirmed attack path runs through PHP’s session upload progress feature, which is switched on by default and works even if the website never uses sessions. Besides code execution, this bug can leak the contents of the worker’s memory, which may include passwords, login tokens and API keys.
Who is affected. Every supported PHP branch before 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Google’s security team puts the affected range at PHP 5.4 through 8.5.11, so the vulnerable code has been in PHP for more than a decade. PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed are all named as at risk, with mod_php the highest. PHP 8.1 and older no longer get official releases. The PHP team published minimal source patches for 7.4, 8.0 and 8.1, and Linux distributions and long-term support vendors received fixes in advance.
The rest of 2026’s PHP security fixes. PHP2Shell is the headline, but it is not the only reason to stay current. Earlier releases this year fixed, among others:
• CVE-2026-17543 (July 30, rated High): SQL injection in PHP’s PostgreSQL functions pg_insert(), pg_update(), pg_select() and pg_delete().
• CVE-2026-17544 (July 30, High): an out-of-bounds memory write in bccomp(), part of the BCMath math library in PHP 8.4 and 8.5.
• CVE-2026-14355 (July 2): memory corruption in openssl_encrypt() when using AES-WRAP-PAD.
• CVE-2026-91765 (September 24, High): unbounded recursion in the SOAP extension that can crash PHP.
• CVE-2026-91767 and CVE-2026-91769 (September 24): two flaws in how PHP checks TLS certificate names, one of them a heap overflow.
• CVE-2026-91768 (September 24): PHP-FPM’s listen.allowed_clients restriction could be bypassed over IPv6.
• CVE-2026-91766 (September 24): login credentials could leak to a different site when PHP followed an HTTP redirect.
Fixes for the Phar archive format and the GD image library rounded out the summer releases.
So what is remote code execution, and why is it the worst case?
Remote code execution, or RCE, is the most serious class of software flaw. It means someone on the other side of the internet can make your server run instructions of their choosing. Picture a web server as a restaurant kitchen that only cooks from the menu: you place an order, the kitchen follows the recipe, and you get your plate. An RCE flaw is like discovering that if you word your order just right, the kitchen will follow anything you write on the ticket, including “unlock the back door” and “empty the cash drawer.”
Once attackers can run code, the playbook is well worn. They plant a web shell (a hidden back door so they can return whenever they like), copy the database with its customer records and saved passwords, inject malware or fake login pages aimed at your visitors, mine cryptocurrency on your hardware, send spam, or use the server as a stepping stone to attack other systems. With PHP2Shell the attacker’s code runs with the same permissions as the website itself, which on a typical site means access to its files, its database and the passwords and API keys stored in its configuration.
The Bigger Picture, and What to Do Now
PHP runs roughly 7 in 10 websites whose server technology can be identified, and WordPress alone powers more than 4 in 10 of all sites. That reach is what makes a core PHP flaw different from a bug in one plugin or one product. A scan of public internet banners on October 20 found about 1.5 million servers advertising a PHP version, and roughly 884,000 of them reported PHP 8.1 or older, branches that will never get an official release for this fix. Banner counts are rough, but the direction is clear: a very large pool of unpatched servers will be around for months.
PHP also hides in places most people never think about: the admin pages of firewalls, storage boxes and phone systems, hosting control panels, intranet tools and vendor appliances. Those rarely get updated on any schedule. And compromised web servers do not just hurt their owners. They become the infrastructure for the next attack, hosting phishing pages and malware, sending spam, joining botnets that knock other sites offline and relaying traffic for criminals who want to hide. Some organizations did not wait to find out: Dutch government websites, BambooHR and several European hosting providers took PHP services offline as a precaution while they patched.
Then there is the speed. Exploitation attempts started before the patch existed, and researchers say AI tools helped turn these bugs into working exploits. The gap between “a fix is announced” and “attackers are using it” is now measured in hours, not weeks. A patch plan built around a monthly maintenance night no longer matches the threat.
What to do this week
1. Find out which PHP version each of your sites runs. In WordPress, go to Tools → Site Health → Info → Server. On a Linux server, check the package changelog for the two CVE numbers, because distributions often backport fixes without changing the version number.
2. If a hosting company runs your server, confirm with them that PHP itself has been updated. Most large hosts moved quickly, but a firewall rule in front of the site is a stopgap, not a fix. WordPress itself does not need an update; the fix lives in PHP.
3. If you run your own server, update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or your distribution’s patched package), then restart Apache, PHP-FPM and any long-running PHP workers. The old code keeps running until you do.
4. Still on PHP 8.1 or older? Treat it as urgent: apply a distribution or vendor backport, or move to a supported version. Note that PHP 8.2 reaches end of life on December 31, 2026.
5. If you truly cannot patch today, the PHP team lists interim settings, such as turning off session.upload_progress.enabled, that block the known attack paths but not every variant. CERT-EU suggests taking internet-facing PHP applications off the public internet until they are fixed.
6. Look back to October 17, not October 21, for signs of trouble: unfamiliar PHP files in upload folders, new admin accounts, unexpected scheduled tasks, or PHP processes launching shell commands. If anything looks off, change the database passwords and API keys the site uses.
Not sure what is running PHP on your network, or whether your web host has actually patched? 845Data can inventory your public-facing systems, confirm what each one is running and get the updates done. Contact us and we will help you work through it.
Sources: PHP security announcement, GitHub advisories GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp, PHP 8 ChangeLog, CERT-EU advisory 2026-018, Tenable, Rapid7, Google Cloud and The Hacker News.