PHP2Shell: A Hacked Website Follows You for Years
On October 21 the PHP project published a security advisory with the headline: "Critical remote code execution vulnerabilities, update now." [1] We spent that morning reading up on the vulnerability and working out which of our customers were affected. Thanks to a well-coordinated patch release all the way down the chain, from PHP itself to our local and cloud-hosted instances, we had near-complete patch coverage by mid-afternoon.
PHP is what lets a web server do things a browser can't do on its own. The contact-us form on your website is a good example: when someone hits Send, a small PHP script on the server emails the message to you. W3Techs counts PHP on 69% of the websites it can identify [2], and WordPress alone, which is built on PHP, runs 39% of all websites. [3] If your business has a website, there is a good chance it was in scope.
PHP2Shell is actually two bugs, tracked as CVE-2026-109618 and CVE-2026-109619. If you want the technical version, PHP's own write-ups are here: CVE-2026-109618 [4] and CVE-2026-109619 [5].
In plain terms: a request crafted in a very specific way tricks the web server into running code it was never meant to run. PHP's advisory describes the outcome as "unauthenticated remote code execution as the web worker account." [4] No account, no password, no phishing email. Just a request, from anyone.
Keeping WordPress updated is a necessity these days, but in this case it wouldn't have been enough. The bug is in PHP itself, underneath WordPress.
Who cares about the website? My nephew was going to replace it anyway.
A compromised website is almost never the attacker's end goal. What they're after is its reputation: the reputation your domain built up over years of being vanilla and benign. Hacked websites get used to host phishing pages that impersonate banks and shipping companies, or QR codes that lead to even more phishing. They get hijacked to send email, and that email authenticates as you! Spamhaus, the non-profit whose blocklists most of the world's mail servers consult, says it is "regularly seeing thousands and thousands of hacked WordPress sites." [6] And it's not just the website that gets flagged. It's your domain name, the same one on your email, your invoices and your business listings.
Everyone cares about the email!
Your website and your email share a domain. Spamhaus's Domain Blocklist is explicit that some of its listings "occur because Spamhaus has identified a legitimate website that is compromised." [7] Once your domain is on that list, mail servers that check it start refusing your messages. And it doesn't bounce back the moment you clean up. Google's guidance to senders is that "it can take some time for Gmail to adjust its spam classification rate for your messages." [8] Gmail's Postmaster Tools ties a "Bad" domain reputation to a history of regularly sending large volumes of spam, and the result is that email "is almost always marked as spam or rejected by the receiving server." [9]
Microsoft is no different. Outlook.com's postmaster site says flat out that "Deliverability to Outlook.com is based on your reputation" and that "Building & maintaining good reputation is a long-term proposition." [10] When your mail bounces off a Microsoft 365 tenant, the stated reason "may be related to content with spam-like characteristics or IP/domain reputation." [11] Translation: your customers on Microsoft 365, which around here is most of them, stop getting your email.
Access from other businesses' networks
Every corporate firewall and web filter keeps its own list of naughty domains. Fortinet has one. Cisco has one. Untangle has one. When your domain gets tagged as "malicious" or "phishing" during the incident, that tag stays in each vendor's database until someone asks that specific vendor to review it. Each has its own form, its own process and its own timeline. So every "your website is blocked on our network" and "our IT people say your domain is flagged" is another chunk of your time spent figuring out who's blocking you now and how to convince them it's all clear.
Why this needs a partner, not a plugin
Knowing what to look for. PHP published no indicators of compromise, so there was no simple list of bad files to search for. The best advice going was to "review recent web server and PHP-FPM logs for worker crashes and malformed multipart uploads." [12] That means a person reading web server and PHP logs who already knows what normal looks like for your site.
Knowing which threats affect you. Hundreds of vulnerabilities are published every week, and thanks to AI it now feels like hundreds every day. Most don't apply to your business. The work is knowing, as soon as the information is out there, whether this one lands on anything you own.
Knowing who is responsible for fixing it. Does the hosting provider patch the operating system? Do the web developers patch PHP? Who handles WordPress? Usually everyone assumes someone else has it. A wise man once said "knowing is half the battle."
What we did when the advisory landed
For the sites and servers we look after, including our own, the week looked like this:
- Confirmed, from our existing inventory, which systems serve PHP, which version, and how it is wired into the web server.
- Applied the distribution's patched packages the day they shipped and restarted the PHP workers, which the advisory notes is required for the fix to take effect.
- Where a patch was not yet available, applied the stopgap settings PHP's advisory recommends, such as turning off the session upload-progress feature, knowing they are a stopgap and not a fix. [5]
- Ran a read-only post-exploitation sweep going back before October 17: unexpected processes, changed PHP files, web shells in upload folders, new administrator accounts, scheduled tasks, and log entries matching the exploit pattern.
- Kept watching, because the third CVE is still open.
None of that is heroic. It's the ordinary work of knowing what you have and reading the advisory properly. The difference between a business that had that done and one that didn't is everything in the sections above.
Five questions to ask whoever runs your website
- What version of PHP is our site running, and is it still receiving security fixes?
- Who is responsible for updating the OS? PHP? And WordPress?
- When PHP2Shell was announced on October 21, when was our site patched?
- Has anyone checked our site for signs of compromise since October 17?
- If our domain showed up on a blocklist tomorrow, who would notice, and how?
If the answers come back as shrugs, that's the gap. It isn't a gap in your website. It's a gap in who's watching it.
Sources
- PHP Project, "Security advisory: Critical remote code execution vulnerabilities, update now," October 21, 2026. https://www.php.net/archive/2026.php#2026-10-21-5
- W3Techs, "Usage statistics and market share of PHP for websites," retrieved October 30, 2026 (69.2% of websites whose server-side language is known). https://w3techs.com/technologies/details/pl-php
- W3Techs, "Usage statistics and market share of WordPress," retrieved October 30, 2026 (39.5% of all websites). https://w3techs.com/technologies/details/cm-wordpress
- PHP Project, GitHub Security Advisory GHSA-w8hw-w9fx-j79w, "RCE via OOM corruption" (CVE-2026-109618), October 21, 2026. https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
- PHP Project, GitHub Security Advisory GHSA-6wmf-4rv5-p3rp, "RCE via stale global state" (CVE-2026-109619), October 21, 2026. https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
- Spamhaus, "Some attack vectors Spamhaus is observing in early 2021," 2021. https://www.spamhaus.org/news/article/804/some-attack-vectors-spamhaus-is-observing-in-early-2021
- Spamhaus, "Domain Blocklist (DBL)." https://www.spamhaus.org/blocklists/domain-blocklist/
- Google Workspace Admin Help, "Top 10 Gmail sender issues." https://support.google.com/mail/answer/15256272
- Google, "Postmaster Tools dashboards" (domain reputation definitions). https://support.google.com/mail/answer/14668346
- Microsoft, Outlook.com Smart Network Data Services (SNDS), welcome page. https://substrate.office.com/ip-domain-management-snds/snds
- Microsoft, Outlook.com Postmaster, "Troubleshooting" (SMTP error codes 421 RP-001 and 550 SC-001). https://substrate.office.com/ip-domain-management-snds/Postmaster/Troubleshooting
- Tanium, "PHP2Shell: Responding to CVE-2026-109618 and CVE-2026-109619," October 21, 2026 (updated October 22). https://www.tanium.com/blog/php2shell-responding-to-cve-2026-109618-and-cve-2026-109619
Need help with this? See our managed IT services, including patching, or call 519-944-8365.
← View All Articles