What Is PHP2Shell?
PHP2Shell is the name for two critical vulnerabilities in the PHP language itself - CVE-2026-109618 and CVE-2026-109619 - disclosed on October 21, 2026, and added to CISA's Known Exploited Vulnerabilities catalog five days later after confirmed attacks in the wild. Both are unauthenticated remote code execution flaws scoring 9.2 on the CVSS scale, affecting PHP versions from 5.4 (released 2012) through 8.5.
In plain language: a stranger can send a specially crafted request to a website running PHP and potentially execute code on the server - before your website's own code even gets involved. The flaw lives inside the PHP engine that powers roughly three-quarters of all websites.
How Does the Attack Actually Work?
Every known trigger arrives as a multipart/form-data request - the format browsers use for file uploads. The crafted request forces the PHP engine into an out-of-memory crash, and two use-after-free bugs turn that crash into an opening: one can leak chunks of server memory (which may contain passwords, session tokens, API keys, or TLS private keys) back to the attacker through a session cookie; the other can be escalated to full remote code execution through the opcode cache.
The part that matters for you: the malicious request only needs to reach a vulnerable PHP engine. The attacker does not need your password, does not need a buggy plugin, and does not need to trick an employee.
Is My Website Vulnerable?
Your site is exposed if it runs PHP and the server has not been patched to the fixed releases: PHP 8.2.35, 8.3.36, 8.4.27, or 8.5.12 (released October 21, 2026). Sites on unpatched older branches - including end-of-life PHP 7.x and 8.0/8.1 - remain exposed unless their host backported the fix.
Check it in 30 seconds: create a file containing <?php echo phpversion(); ?>, visit it, and compare against the fixed versions above. Then delete the file. On shared hosting you cannot apply the patch yourself - your host does that at the platform level.
Why Shared Hosting Customers Need a Different Playbook
If your site runs on HostGator, GoDaddy, Bluehost, or similar shared hosting, patching is your host's responsibility - but verification and mitigation are yours. The realistic playbook:
- Open a support ticket asking two questions: what PHP version your account runs, and whether the platform has applied the October 21, 2026 PHP security updates
- While you wait, apply the mitigation below - it blocks the known attack path entirely
- Confirm the fix by re-checking the PHP version after the host responds
This is exactly what we did for yobitech.io this week: our site runs PHP on HostGator, so we applied the emergency mitigation at the web-server level the same day the exploitation was confirmed.
What Is the Safe Emergency Mitigation?
Block multipart/form-data requests at the web-server level until your PHP is patched. Every known PHP2Shell trigger uses that request format, and most business websites never legitimately receive one - contact and newsletter forms submit JSON or form-encoded data instead. One Apache rule in your .htaccess returns 403 to every multipart request:
RewriteCond %{HTTP:Content-Type} multipart/form-data [NC]
RewriteRule ^ - [F]
Two caveats to know before you copy it: the rule will block any file-upload feature on your site while it is active, and it is a mitigation, not a fix - remove it once your PHP is patched. If your site takes file uploads today (patient intake forms, resume uploads, product images), allow-list that specific page and patch those flows first.
Researchers at Sansec, who published the most complete technical analysis, recommend exactly this approach for stores and sites that cannot patch immediately.
What Should You Do After the Patch?
Patch first, then assume nothing was stolen until you have looked. Because one of the two flaws can leak server memory to attackers, a compromised site may have exposed secrets that were in memory at the time:
- Rotate credentials that could have lived in server memory: database passwords, API keys, SMTP credentials, payment processor keys
- Invalidate all active sessions and require re-login
- Review access logs for multipart POST requests you did not expect
- If your site handles customer data, document what you checked - that timeline matters if questions come later
The Bigger Lesson: Your Platform Is Your Attack Surface
This is the second time in two years that a vulnerability in the web's infrastructure layer - not in any single website - put millions of sites at risk overnight. The businesses that came through this one cleanly had three things in place: visibility into what they run, the ability to mitigate fast when patching is out of their hands, and a relationship with a security partner who tells them what to do the same week it happens.
That is what our vulnerability assessment services provide on a continuous basis, and what our IT audit and compliance practice formalizes into a plan. If your website, your hosting stack, or your third-party tools feel like a black box, that is the gap to close - start with a conversation.
Need Help Securing Your Organization?
Our team of certified experts can help you implement the security measures discussed in this article.
Contact Us