Drupal · PHP2Shell
Is my Drupal site affected by PHP2Shell?
Probably, unless your PHP is already patched. Drupal was the first application researchers took over with PHP2Shell, but the bug sits in PHP, so your Drupal version and modules do not change the answer.
Last reviewed 2026-10-28
Updating Drupal does not fix this
PHP2Shell is in PHP itself, below Drupal. Researchers demonstrated unauthenticated remote code execution against the official drupal:latest image — Drupal was the first confirmed target, on 20 August 2026. What matters is the PHP version your server runs, and only whoever manages the server can update it.
1. Find your PHP version in Drupal
This shows the PHP that actually serves your site, which is the one that matters.
- Log in as an administrator and go to Reports → Status report (
/admin/reports/status). - Find the PHP row — it shows the version the web server runs.
- Sites on Drupal 7 show it in the same place.
drush status --field=php-version # Drush (CLI PHP)
drush php:eval 'echo PHP_VERSION, PHP_EOL;'2. Compare it
Paste a version, the output of php -v, or one version per line for a whole fleet. Runs entirely in your browser.
The CLI and the web server can run different PHP builds. Check the version your web server actually uses: php-fpm -v (or php-fpm8.3 -v), or phpinfo() served by that site. Version results assess CVE-2026-109618 and CVE-2026-109619 only. They cannot assess the configuration-dependent CVE-2026-115560; see the session configuration guide.
| Branch | Vulnerable | Fixed in |
|---|---|---|
| 8.5 | < 8.5.12 | 8.5.12 |
| 8.4 | < 8.4.27 | 8.4.27 |
| 8.3 | < 8.3.36 | 8.3.36 |
| 8.2 | < 8.2.35 | 8.2.35 |
| 8.1 · 8.0 · 7.4 | all | Source backport only |
| 5.4 – 7.3 | all | No fix |
3. Get it patched
Shared or managed hosting
Your host patches PHP. Choose the newest PHP version in your hosting panel, then ask them to confirm the patch and the restart. Hosting guide →
Your own server, VPS or container
You (or your developer) patch PHP and restart PHP-FPM / Apache. Patch guide →
Subject: PHP2Shell (CVE-2026-109618 / CVE-2026-109619) — patch status
Hi,
Please confirm that the PHP runtime serving my site(s) <domain> has been
updated to a release that fixes CVE-2026-109618 and CVE-2026-109619
(PHP 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 or a vendor build with the backport),
and that PHP-FPM / LSAPI workers were restarted afterwards.
If my account is on PHP 8.1 or older, please tell me which patched version
I can move to.
ThanksManaged Drupal hosting
The 22 October 16:36 UTC Pantheon update closes the incident and confirms completion across customer environments, including LTS. It still reports limited probing being blocked. The final notice does not explicitly confirm free/sandbox completion; the preceding notice scheduled those environments for 24–48 hours. Verify your environment. Acquia’s rollout has not been verified here.
Self-hosted with Docker? Rebuild on a fixed php base image or pull the rebuilt drupal image and confirm the PHP version inside the container before deploying.
4. After patching
- Check the PHP version in Drupal again — it should show a fixed release (or ask your host to confirm a backported build).
- If the site was exposed for a while, change admin passwords and API keys stored in the site configuration, and look for unknown admin users or new PHP files. Detection guide →
Questions
Is my Drupal site affected by PHP2Shell?+
If it runs on PHP older than 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (and the host has not installed a patched package), yes. The Drupal version, theme and extensions do not matter — the bug is in PHP.
Will updating Drupal fix PHP2Shell?+
No. Drupal updates change the application, not the PHP runtime underneath. Keep Drupal updated anyway, but the fix is a PHP update by whoever runs your server.
Does an attacker need an admin account?+
No account is needed for the demonstrated attacks. mod_php has paths before application code; the validated FPM session-lifecycle path needs a suitable application operation after startup. See the PHP advisory.
Is there a Drupal security advisory for PHP2Shell?+
Drupal’s PSA directs site owners to update PHP themselves or follow their host’s rollout. It is an informational announcement, not a Drupal core fix. Its future-release wording is historical; PHP’s fixed releases are available.
Does Drupal 7 make a difference?+
Drupal 7 does not remove the need to patch PHP. For an old PHP branch, ask for a vendor backport covering both CVEs and verify the installed build and restarted workers. Plan a supported PHP/CMS migration; see the patch guide.
Related
- What is PHP2Shell?PHP2Shell (often typed pho2shell) in plain English: what this PHP flaw means for your website, how to check if you are affected and what to do now.
- Hosting providersPHP2Shell on shared and managed hosting: check and switch PHP versions in cPanel or Plesk, review provider updates and ask your host about patches.
- Fix / patchFix PHP2Shell on Linux, Docker, cPanel, Plesk, macOS and Windows. Follow patch, restart and verification steps, including options for older PHP.
- WordPressIs your WordPress site affected by PHP2Shell? How to find your PHP version in Site Health, why plugin updates do not help, and a message to send your host.
- DrupalCheck whether PHP2Shell affects your Drupal site. Find your PHP version with the Status report or Drush and learn what to ask your host.
- JoomlaIs your Joomla site affected by PHP2Shell? How to check PHP in System Information, why a Joomla update is not the fix, and what to ask your host.