PHP2Shell is now exploited in the wild: is your site affected, and what do you do today?
· Zero Agency
Most small teams will read about PHP2Shell and think "we don't use PHP." Then someone remembers the WordPress marketing site. And the help desk. And the old admin panel nobody has logged into since 2023.
That's the problem with this one. It doesn't care what your main product is written in. It cares whether there's a PHP process anywhere that answers web requests.
TL;DR
- PHP2Shell is two critical bugs in PHP itself, CVE-2026-109618 and CVE-2026-109619. They allow unauthenticated remote code execution.
- PHP fixed them on October 21 in 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Updating is the only complete fix.
- As of today, October 26, there is confirmed successful exploitation in the wild against Apache mod_php on PHP 8.4.26.
- Your job today: list every PHP server you own, check the real version the web server runs, patch, restart, then check logs.
What is PHP2Shell, in plain words?
PHP2Shell is the name for two bugs in the PHP runtime, not in any one app or plugin. According to the PHP security advisory, one abuses out-of-memory handling while a request is only half set up. The other lets internal state from one request survive and get reused by the next request on the same worker.
The result is the same for both: a stranger sends a crafted request and can end up running code on your server. No login needed. Oracle rates the worst of the two at CVSS 9.8.
Because the bug sits below your application, your code being clean doesn't save you. PHP says the risk is highest for Apache with mod_php, where "an unauthenticated request can trigger the attack before any application code runs."
Is PHP2Shell actually being exploited?
Yes. For the first few days the honest answer was "people are trying, nobody has shown it worked." That changed today.
BleepingComputer reported on October 26 that Adel Karimi, detection and response lead at Perplexity, recorded confirmed remote code execution in his honeypots against an Apache mod_php install running PHP 8.4.26. Marcus Hutchins of Expel called it "by far the highest quality confirmation of in-the-wild php2shell exploitation I've seen so far."
The attack traffic was already there before that confirmation:
- Amazon Threat Intelligence saw an exploitation attempt on October 17, four days before the patch.
- The Delft Threat Intelligence Lab tracker counted 41,791 exploitation requests from 579 source IPs in 68 countries between October 21 and this morning (checked 10:09 UTC). 171 of those IPs sent code or a downloader.
If your server is on the internet and unpatched, assume it has been probed already.
Which PHP versions are vulnerable, and which are safe?
Safe versions from the PHP project are 8.5.12, 8.4.27, 8.3.36 and 8.2.35 or newer. Anything below those in each branch is vulnerable.
PHP 8.1 and older no longer get updates from the PHP project. Some Linux distributions and LTS vendors ship backported fixes, and PHP published minimal source backports for 7.4, 8.0 and 8.1. CISA's guidance is blunt: if you can't update, or you're on 8.1 or older, take those systems offline until they're patched.
One trap: if you install PHP from your distribution (Debian, Ubuntu, RHEL and friends), the version string may not read 8.4.27 even when the fix is in. PHP says distributions received the patches in advance, so check your vendor's security notice for the package version that contains it.
How do I find every PHP server I own?
This is the step people skip, and it's where the risk hides. CISA notes that "PHP is often a component of other software and prevalence may not be directly observable."
Walk this list:
- Websites and CMSs. WordPress, Drupal, Joomla, WooCommerce, Magento. If it has a wp-admin, it runs PHP.
- Frameworks. Laravel, Symfony, CodeIgniter apps, including the "temporary" internal tool someone built last year.
- Shared hosting and control panels. cPanel, Plesk and similar. Ask your host what version your account runs and when they patched.
- Bought software. Help desks, forums, wikis, asset trackers, billing panels.
- Appliances. The NCSC-NL php2shell repository warns that PHP is embedded in network devices and management interfaces where you can't update PHP yourself. It also keeps a live list of vendor statuses.
- Containers. Old images pinned to a php:8.x tag that nobody rebuilt.
If you built your product with an AI coding tool on a JavaScript stack, check this list anyway. The app might be fine. The marketing site, the blog and the support portal often aren't.
How do I check which PHP version my web server really runs?
Check the version the web server uses, not just the command line. They can differ.
- Run
php -von the server, but also check the PHP-FPM or Apache module version, for examplephp-fpm -vor your package manager's installed version. - For a quick look from the browser side, a temporary
phpinfo()page shows the exact version and SAPI. Delete it right after. - On shared hosting, the panel usually shows the version per site. If it doesn't, open a ticket and ask for the date they applied the PHP2Shell fix.
How do I patch PHP2Shell safely today?
- Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your vendor's fixed package.
- Restart every PHP worker. The bug lives in worker state, so old workers keep old code running.
- Rebuild containers from a fixed base image and redeploy. Don't just patch the running container.
- Update appliances as each vendor ships a fix. Track them in the NCSC-NL list.
If you truly can't patch in the next few hours, PHP lists temporary mitigations, such as setting session.upload_progress.enabled=0 in php.ini or the FPM pool and restarting every worker. Read the full advisory before relying on any of them. PHP is clear that they reduce exposure and "do not make an installation safe." A web application firewall may help a little, per CISA, but it isn't a fix either.
How do I know if I was already hit?
Patching closes the door. It doesn't tell you whether someone walked in last week.
- Look for POST requests containing
PHP_SESSION_UPLOAD_PROGRESSin form uploads, which Amazon lists as an indicator. - Look for PHP worker processes launching shells or downloading tools. CISA flags this and publishes a detection rule in its SIGMA rules repository.
- Check for new or changed files in your web root since October 17.
If you find signs of compromise, treat the server as untrusted. Rotate the secrets it could read from a clean machine, then rebuild it rather than cleaning it in place.
What should small teams take from this?
Our opinion: the hardest part of PHP2Shell isn't the patch. It's knowing what you run. Most small teams can name their main app's stack in a second. Far fewer have a written list of every other server they run.
Write that list today, while you have a reason to. Put the owner and the update path next to each item, so the next critical advisory takes an hour instead of a week.
If you want an outside check, Liquid produces an evidence-backed security report and a fix plan your developer can use. It only runs with your verified authorization and an agreed scope, and a fix counts as done only after a recorded retest. You can read more about who we are in Introducing Zero Agency.
FAQ
Does PHP2Shell affect WordPress? Yes, if the WordPress site runs on an unpatched PHP version. The bug is in PHP itself, so any PHP app serving web requests is in scope, regardless of plugins.
Is updating WordPress or my plugins enough? No. You need to update PHP on the server. App and plugin updates don't change the PHP runtime.
I'm on PHP-FPM, not mod_php. Am I safe? No. PHP lists PHP-FPM, php-cgi, FrankenPHP and LiteSpeed as affected too. mod_php is just the highest risk.
Is there a new PHP bug I should know about?
PHP published an informational advisory on October 23 about CVE-2026-115560, which only applies to an unusual configuration. The same setting, session.upload_progress.enabled=0, covers it until the next release.
Is the CLI version enough to check? No. The command line and the web server can run different PHP builds. Check the one serving requests.