What is PHP2Shell?
PHP2Shell is the name used for two critical vulnerabilities in PHP itself: CVE-2026-109618 and CVE-2026-109619. They can allow an attacker to run code on a vulnerable web server without logging in, with the permissions of the account running the website.
The PHP project rates both vulnerabilities 9.2 out of 10, Critical, under CVSS v4.0 and published fixes on 21 October 2026 in its security advisories.
Am I affected?
If your website uses PHP and your hosting provider or administrator has not confirmed that both fixes are installed, treat it as potentially affected. This applies to WordPress, Laravel, Drupal, Joomla and custom PHP websites, although the ease of exploitation depends on the server configuration and application.
The PHP project advises updating all installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and considers the risk highest with mod_php.
How do I check?
Ask your hosting provider or server administrator to confirm whether the PHP runtime actually serving each website includes both PHP2Shell fixes. A command-line version check or an outside website scan alone cannot reliably answer this, because websites can use different PHP runtimes and vendors may backport security fixes.
- Identify the runtime each website uses. The PHP used by your terminal may differ from the PHP handling web requests.
- Check the installed package and vendor advisory. Confirm that its exact release includes fixes for both CVEs.
- Check that the patched code is running. Confirm that the relevant PHP workers or web server were restarted after installation.
How do I fix it?
Update the PHP runtime serving your website to a release containing both fixes, or install your hosting provider's or distribution's confirmed patched package. Restart the affected PHP workers, then verify that each website is using the updated runtime.
For PHP-FPM, restart the relevant PHP-FPM services; for Apache with mod_php, restart Apache. Follow your host's instructions for other server setups and for containers or appliances that bundle PHP.
If you cannot update immediately, follow the PHP project's temporary mitigation guidance while arranging the update. Measures such as setting session.upload_progress.enabled=0 in the server's PHP configuration and restarting every worker reduce exposure to specific attack paths but do not replace patching. Do not rely on changing this setting inside application code. The UK National Cyber Security Centre advises considering taking a system offline if temporary mitigations cannot be applied promptly.
Does updating WordPress fix it?
No, updating WordPress, its plugins or its themes does not fix PHP2Shell because these vulnerabilities are in the server's PHP runtime. Your hosting provider or server administrator must update PHP itself, even if WordPress and every plugin are already up to date.
Which PHP versions are safe?
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 are the first official releases in their respective branches that fix the two original PHP2Shell vulnerabilities. Use the latest security release of a supported branch or a vendor-confirmed patched package, because fixing these two flaws does not guarantee protection from every other vulnerability.
- PHP 8.2, 8.3, 8.4 and 8.5: install at least the fixed release listed for your branch, or a later security release in that branch.
- PHP 7.4, 8.0 and 8.1: official support has ended, but the PHP project provided source patches and some vendors supply patched packages; confirm coverage with your vendor or upgrade to a supported branch.
- PHP 7.3 and older: the PHP project did not provide source patches for these branches; upgrade to a supported branch.
A separate advisory published on 23 October covers an unusual session configuration issue, CVE-2026-115560. The PHP project recommends keeping session.upload_progress.enabled=0 until the next regular bugfix release; applications that never change the session serialization handler at runtime are outside the configuration described in that advisory.
What if my host says they've patched it?
Your host may have installed both fixes without changing the PHP version number displayed by your website, because vendors can backport security patches into their own packages. Ask for confirmation that the exact package serving your website includes fixes for both CVEs and that the affected workers have been restarted.
A useful question to send your host is:
Can you confirm that the PHP runtime serving my website is patched for CVE-2026-109618 and CVE-2026-109619, identify the installed package release or vendor advisory, and confirm that the affected services were restarted?
A firewall rule or other temporary mitigation is not the same as installing the PHP fixes.
Why should I check for compromise after updating?
Updating PHP fixes the vulnerabilities but does not remove backdoors or undo changes made before the update. Amazon Threat Intelligence recorded an exploitation attempt on 17 October 2026, so review available evidence from at least that date rather than only from the day you patched.
- Unexpected PHP files in upload, cache, image or temporary folders, including
wp-content/uploadsandstorage. - Unexplained changes to website files,
.htaccess,.user.inior settings such asauto_prepend_file. - Suspicious upload requests involving
PHP_SESSION_UPLOAD_PROGRESS, especially alongside unusual out-of-memory or fatal errors. - Unexpected processes, scheduled tasks, administrator accounts or outbound connections.
These are indicators to investigate, not proof of compromise on their own. If you find unexplained suspicious activity, preserve the evidence and get help from a qualified incident-response provider.
How can Warden help?
Warden's Malware & PHP2Shell check runs on your own Linux server over SSH to assess PHP patch status and look for signs of compromise. It reads files, settings and logs accessible to the account running the check, without changing or executing the files it inspects.
If the check is available in your account, open Malware check in the Warden portal and follow the setup instructions. Review its findings alongside your hosting provider's package information and your own knowledge of the server.
Warden's regular website scans look from the outside and cannot reliably confirm PHP patch status or rule out an earlier compromise. No scan can prove that a server is clean: it helps focus the investigation, but does not replace a careful review by someone who knows the system.
Sources
- PHP: security advisories of 21 and 23 October 2026php.net
- PHP security advisory GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (CVE-2026-109618)github.com
- PHP security advisory GHSA-6wmf-4rv5-p3rp: RCE via stale global state (CVE-2026-109619)github.com
- UK National Cyber Security Centre: critical security issue affecting PHPncsc.gov.uk
- Amazon Threat Intelligence: PHP2Shell exploitation before public disclosureaws.amazon.com
- watchTowr: PHP2Shell FAQwatchtowr.com
- W3Techs: usage statistics of PHPw3techs.com
