PHP2Shell is the name for two critical flaws in the PHP engine, disclosed on October 21, 2026. They let an attacker run code on a web server without logging in. PHP runs about 70% of websites with a known server-side language.
Here, our expert has explained which PHP security update to install, how to check the PHP version on each server, and what to do when an app is past its PHP end-of-life date. We have also showcased how a Laravel upgrade and legacy application modernization protect older apps.
What Is PHP2Shell, and Why Did Governments Take Their Websites Offline?
PHP2Shell covers two flaws in PHP itself: CVE-2026-109618 and CVE-2026-109619. PHP rated both 9.2 out of 10 on the CVSS v4.0 scale.
The bug is in the engine that runs your code, so PHP application security must now cover the PHP version on each server. Attackers can also read server memory that holds passwords and API keys.
- Affected: every web-facing PHP setup, including PHP-FPM, mod_php, php-cgi, FrankenPHP, and LiteSpeed
- Highest risk: Apache with mod_php
- Versions: releases from the last decade, back to PHP 5.4
- Fixed in: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35
On October 21, agencies in the Netherlands, Finland, Germany, France, and Belgium took public websites offline while they patched. Wiz compares this PHP vulnerability to Heartbleed, the 2014 OpenSSL flaw.
AI Found This PHP Vulnerability in Weeks. The Code Was More Than 10 Years Old.
Wiz, working with Calif and OpenAI, used advanced AI models to find the first bug on August 19, 2026. Wiz says one researcher with AI tools did in a week what once took an expert team months. Attackers have similar tools.
Amazon recorded a PHP2Shell attack attempt on October 17, four days before disclosure, and now reports broad exploitation. More than 1 million PHP servers were still unpatched on October 21.
Defenders can use AI-assisted engineering to scan large codebases for functions that newer PHP versions removed.
Is Your Website at Risk? How to Check PHP Version on Every Server
Treat every server that runs PHP as exposed to this PHP vulnerability until you confirm its version. The UK National Cyber Security Centre advises teams to find all PHP installations, including current ones.
Check the Version Your Web Server Uses
The php -v command shows the command-line version, which can differ from the build your web server runs. Check the version in your hosting panel, or ask your managed host to confirm the patch in writing.
Look for PHP Outside Your Main Website
- WordPress, Drupal and Joomla sites
- Customer portals and admin panels built by past agencies
- Network appliances, such as Palo Alto Networks PAN-OS
- Microsites and test servers that no one maintains
The CISA alert on the PHP vulnerabilities says to take offline any system you cannot update, including servers on PHP 8.1 or older. Short-term tech team augmentation can help small IT teams finish this inventory faster.
The PHP Security Update to Install Today, Step by Step
Updating PHP is the only complete fix for PHP2Shell. The PHP security advisory lists temporary settings that reduce exposure but do not make a server safe.
- Install PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your Linux vendor’s patched package.
- Restart every PHP worker.
- Confirm the running version on each web server.
- Turn on web application security rules at your firewall or CDN while you patch.
- Review web and PHP logs from October 17 onward.
- Take offline any system you cannot update.
Back up production and test in staging when time allows. Teams with automated CI/CD pipelines can release one PHP security update to many servers at once.
The PHP End of Life Deadline That a Patch Cannot Fix
A PHP security update only helps if your branch still receives one. The PHP 8.1 end-of-life date passed on December 31, 2025. For 7.4, 8.0, and 8.1, PHP released only source code backports. W3Techs data shows about 37% of PHP websites run a version older than PHP 8.
| PHP version | Security support ends | PHP2Shell fix |
| 8.5 | December 31, 2029 | 8.5.12 |
| 8.4 | December 31, 2028 | 8.4.27 |
| 8.3 | December 31, 2027 | 8.3.36 |
| 8.2 | December 31, 2026 | 8.2.35 |
| 8.1 | Ended December 31, 2025 | Source backport only |
| 8.0 | Ended November 26, 2023 | Source backport only |
| 7.4 | Ended November 28, 2022 | Source backport only |
| 5.6 | Ended December 31, 2018 | None |
PHP EOL dates are from php.net.
PHP 8.2 EOL is December 31, 2026
Version 8.2.35 fixes PHP2Shell, but the branch gets no fixes after December 31. Plan the move to PHP 8.3 or later now.
PHP 7.4 Migration Needs a Project Plan
PHP 7.4 EOL was in 2022, and the PHP 5.6 end-of-life date was in 2018. These apps often use functions that PHP 8 removed, so a Laravel upgrade usually happens with the PHP upgrade. This is legacy application modernization work.
Signs Your Server Was Already Breached, and What to Do Next
A patch does not remove an attacker who got in first. Look for these signs:
- Multipart requests followed by memory-limit errors or repeated HTTP 500 errors
- Large or malformed PHPSESSID cookies in responses
- PHP workers that restart without cause, start shells, or download tools
- New PHP files in upload folders, or new admin accounts
If you find any, start your incident response plan:
- Isolate the server from the network and preserve logs and disk images.
- Rotate the passwords, API keys, and certificates the server held, because PHP2Shell can leak memory.
- Rebuild from a clean, patched image.
- Check your breach notification duties.
NIST SP 800-61 Revision 3 is the current U.S. guide for incident response planning.
What PHP2Shell Means for Healthcare, Finance, Retail, Logistics and SaaS
Each sector has its own breach reporting deadline. Add these to your incident response plan.
- Healthcare: HIPAA requires a breach affecting 500 or more people to be reported to HHS within 60 days. Check every patient-facing system in your healthcare software.
- Finance: PCI DSS Requirement 6.3.3 requires critical patches within one month of release. This covers payment portals in banking and financial services.
- Retail: Checkouts that handle card data also fall under PCI DSS. Patch before holiday traffic peaks.
- Logistics: One exposed tracking portal can expose partner data. Review the integrations on your logistics platforms.
- Technology and SaaS: Record patch dates and versions for customer security reviews.
- Europe and the UK: GDPR Article 33 sets a 72-hour deadline to notify the regulator of a personal data breach, where feasible.
PHP Application Security After PHP2Shell: Five Changes to Make
These five changes improve PHP application security before the next PHP vulnerability:
- Keep a live inventory of every PHP installation, its version, and its owner.
- Automate patch management so each critical PHP security update reaches all servers within days.
- Follow PHP security best practices from the OWASP PHP Configuration Cheat Sheet for php.ini settings.
- Run a PHP security audit every year.
- Track PHP EOL dates and start each upgrade six months before the PHP end-of-life date.
Cloud-native architecture makes these steps easier to repeat.
How ViitorCloud Helps Teams Patch, Upgrade and Recover
ViitorCloud is a PHP development company and an official Laravel Partner that has delivered software since 2011. Our teams cover each stage of a PHP2Shell response, from patching to long-term PHP application security.
Patch and Verify
Our DevOps engineers apply the PHP security update, restart workers, and confirm versions on every server.
Investigate and Contain
Our in-house incident response team reviews logs, isolates affected systems, and supports recovery.
Upgrade and Modernize
We run the Laravel upgrade and legacy application modernization work for apps on PHP 7.4 or PHP 5.6.
For KPMG, our team recovered a stalled State Family Database project and secured resident data on deadline.
Our legacy modernization services have cut IT maintenance costs by 40% and raised uptime to 99.99% for enterprise clients.
If your team needs help with these steps, talk to our PHP and security engineers.
Conclusion: Patch This Week, Then Plan the Upgrade
PHP2Shell affects nearly every PHP release from the past decade, and attacks have started. Install the PHP security update, confirm versions, and check for signs of a breach using your incident response plan.
PHP 8.2 reaches its PHP end-of-life date on December 31, 2026, and older apps need a Laravel upgrade or legacy application modernization. Regular upgrades keep PHP application security in place for the next PHP vulnerability.
Vishal Shukla
Vishal Shukla is Vice President of Technology at ViitorCloud Technologies.
Frequently Asked Questions
Is PHP2Shell being exploited?
Yes. Amazon reported broad exploitation after the October 21 disclosure and an attack attempt on October 17.
What if my app runs a PHP end of life version?