Check a serverfor PHP2Shell
PHP2Shell is the name for two critical flaws in PHP 5.4 and later that let an attacker run code on a server without logging in. Enter a domain to see which PHP version its server shows and what to do about it.
- PHP 5.4 and later
- CVSS 9.2
- Fixed 21 October 2026
Six checks
- Runs PHP—
- PHP version—
- Fix for this branch—
- Shop platform—
- WAF in front—
- Way around the WAF—
Verdict
$ php2shell check
Enter a domain above. The check opens the site as a visitor would, sends one small form upload and reads public DNS. It never tries to trigger the flaw.
What the check looks at
The check reads the front page, its headers and cookies, and public DNS, which any browser can see. It also sends one small, harmless upload to see whether the upload path the flaw uses is reachable. It never sends exploit code and never logs in.
- 01
Runs PHP
Headers, cookies and file paths that show PHP is running.
X-Powered-By · PHPSESSID · *.php
- 02
PHP version
Many servers include the exact version in a response header, often only on pages that PHP itself answers. If the server hides the version, the report says so.
X-Powered-By: PHP/8.x.y
- 03
Fix for this branch
PHP supports 8.2 and later. Branches 8.1 and older get no official release.
8.2 · 8.3 · 8.4 · 8.5
- 04
Shop platform
Online stores on Magento, Shopware and WooCommerce run on PHP, so they are exposed too.
/static/ · /bundles/ · /wp-content/plugins/
- 05
WAF in front
Cloudflare has rules against the known exploits on every plan, including the free one. They help until PHP is updated, but they don’t fix it.
server: cloudflare · cf-ray
- 06
Way around the WAF
A DNS name that points straight at the server lets an attacker go around the WAF. The check looks for such names.
mail. · ftp. · cpanel. · origin.
Two flaws in PHP itself
CVE-2026-109618 and CVE-2026-109619 let an attacker run their own code on the server without logging in. The attack reaches PHP before the application runs, so plugins, security modules and changes to the application’s code can’t stop it.
CVE-2026-109618 corrupts memory when PHP runs out of memory during a request. CVE-2026-109619 lets internal state from one request carry over into the next request on the same worker. Every known trigger is a multipart/form-data request, the kind a file upload form sends.
Patching PHP is the only mitigation, says PHP core developer Gina Peter Banyard.
- CVSS v4.0
- 9.2
- Both flaws, as rated by the PHP security team
- Affected
- 5.4+
- Servers running PHP 5.4 or later
- Official fix
- 8.2+
- No official release for 8.1 and older
- Fixed
- 21 Oct
- In 8.2.35, 8.3.36, 8.4.27 and 8.5.12
Updating PHP is the only complete fix
The flaw is in PHP itself, so changes to the application’s code can’t fix it. See the fixed versions and update guides and the fix status by vendor.
- 01
Update PHP to a fixed version
Install 8.2.35, 8.3.36, 8.4.27 or 8.5.12, whichever matches your branch, then restart PHP-FPM. If your hosting company runs PHP for you, check whether they have installed it.
- 02
Move PHP 8.1 and older to a supported branch
Those branches get no official release. Move to 8.2 or later, or ask your hosting company whether they backport the fix. The page on PHP 8.1 and older lists the backports that exist.
- 03
Update containers and servers that bundle PHP
Docker images, FrankenPHP, Swoole and RoadRunner include the PHP they were built with. Pull a rebuilt image or a build with a fixed version, then recreate the process.
- 04
If you use Cloudflare, block direct access to the server
Cloudflare’s rules only help if the server refuses connections that don’t come through Cloudflare. Allow only Cloudflare’s IP ranges to reach it.
- 05
If you can’t update yet, take the site offline
A site that is offline until the fixed version is installed can’t be attacked through this flaw in the meantime.
memory_limit = -1session.upload_progress.enabled = 0fatal_error_backtraces = 0
PHP-FPM, in every pool
php_admin_value[memory_limit] = -1php_admin_flag[session.upload_progress.enabled] = offphp_admin_flag[fatal_error_backtraces] = off
These are the interim settings from PHP’s advisories. They reduce the risk but are not a complete fix. With memory_limit = -1 one request can use all the server’s memory, and fatal_error_backtraces exists only in PHP 8.5. Restart every PHP worker after the change, and remove the settings once PHP is updated.
Common questions
Does the check try to exploit or attack my site?
No, it never tries to trigger the flaw, because that means pushing the server into a memory error that can crash it or disrupt real visitors. It reads the PHP version and other details the server shows every visitor, opens a few ordinary pages, and sends one small upload, the size of a normal form, to see whether the upload path the flaw uses is reachable. It sends no exploit code, never tries to log in and never touches anything behind a login. When a server hides its version the result can’t be certain, so ask your hosting company if in doubt.
What is PHP2Shell?
PHP2Shell is two critical vulnerabilities in PHP, CVE-2026-109618 and CVE-2026-109619, that let an attacker run code on a web server without logging in. They affect PHP 5.4 and later, and PHP released the fix on 21 October 2026. The flaws are in PHP itself, so every PHP installation that serves web pages is affected until it is updated, whatever application it runs.
Which PHP versions are affected?
Every PHP version from 5.4 up to the fixed versions is affected. On the supported branches, that means PHP 8.2 before 8.2.35, 8.3 before 8.3.36, 8.4 before 8.4.27 and 8.5 before 8.5.12. PHP 8.1 and older are affected and get no official release.
Which PHP versions have the fix?
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, released on 21 October 2026, fix both vulnerabilities. Linux distributions and hosting control panels also ship fixed packages, sometimes under an older version number. The fixed versions page has update guides for common setups.
Why does it say “Check needed”?
The server runs PHP but doesn’t show its version from outside, so the check can’t tell whether it has the fix. You also see it when a bot challenge or an error page answers instead of the site. Your hosting company can tell you the version. The report names the hosting company when it can and includes a message you can send them.
Do you keep the domains people check?
The checker keeps each result in memory for five minutes so the report page can show it, and doesn’t write results to disk. The site’s visit statistics (Plausible, hosted by PXL) record which pages are opened, so a report address such as /check/example.com appears there.
My hosting company runs PHP for me. What do I ask them?
Ask which PHP version runs your site, whether the 21 October security fix is installed, and if not, when it will be. On 8.1 or older, ask whether they will backport the fix. Every report includes a message you can send them.
How do I check which PHP version my site runs?
In WordPress, open Tools → Site Health → Info → Server. Many hosting companies also show the PHP version in their control panel. The PHP version page explains other ways to check.
How do I know whether my hosting company has installed the fix?
Ask your hosting company, because the version number doesn’t always show whether the fix is installed. A site on 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later has it. An older number can still have the fix if the hosting company installed a fixed package from a Linux distribution or control panel. The fix status page lists what distributions, control panels and hosting companies have announced, as of 21 October 2026.
Why might the PHP version number stay the same after the fix?
Some Linux distributions and control panels add the fix to the PHP version they already ship, so the number doesn’t change. On Ubuntu 24.04 the fixed package is 8.3.6-0ubuntu0.24.04.13, and PHP still reports 8.3.6. cPanel also fixed its PHP 7.4, 8.0 and 8.1 packages, and those branches have no newer official version to move to. The PHP version page explains how to check whether your hosting company installed the fix.
Is my site affected if it has no upload form?
Yes, if it runs on a PHP version without the fix. PHP reads the request itself before the application’s code runs, so the application doesn’t need an upload form for the attack to work. CERT-EU notes that one unauthenticated request can trigger the attack before any application code runs.
Is my WordPress, WooCommerce or Magento site affected?
Yes, if the server runs a PHP version without the fix. The flaw is in PHP itself, so any PHP application is exposed regardless of its own code — including online stores built on Magento, Shopware or WooCommerce. Calif showed that an attacker without a login can run code on WordPress 7.1.2, Magento 2.4.9, Drupal 11.4.3 and other applications. The WordPress page explains what WordPress site owners should do.
Do I need to update WordPress?
No, WordPress.org says no WordPress update is required or planned for these issues. The fix is a PHP update, which your hosting company or server administrator installs. WordPress.org advises checking with your hosting company, which may already be updating PHP and adding firewall rules. The WordPress page explains this in detail.
Is PHP2Shell the same as wp2shell?
No, wp2shell is a separate pair of flaws in WordPress itself, CVE-2026-63030 and CVE-2026-60137, which BleepingComputer covered under that name in July 2026. WordPress fixed them on 17 July 2026 in versions 7.0.2 and 6.9.5 and pushed the update to affected sites automatically. PHP2Shell is in PHP and needs a PHP update.
Does a login page in front of the application protect it?
No, PHP handles the attack before the application checks whether anyone is logged in, so a login page or admin password inside the application doesn’t stop it. PHP’s advisory describes a working exploit in which a request without a login triggers the attack before any application code runs.
Will a security plugin or a plugin update protect my site?
No, the attack runs inside PHP before WordPress, Magento or any plugin or security product loads, so only a PHP update fixes it. Cloudflare says updating site code or plugins won’t fix it.
I’m on PHP 7.4, 8.0 or 8.1. Is there a fix?
There is no official PHP release for these branches, though some distributions, LTS vendors and control panels have backported the fix. Ubuntu fixed PHP 8.1 on 22.04 and PHP 7.4 on 20.04 (through Ubuntu Pro), and cPanel fixed its ea-php74 to ea-php81 packages. The PHP security team also published minimal source backports for 7.4, 8.0 and 8.1 for people who build PHP themselves. CISA advises taking systems on 8.1 or older offline until they are patched or upgraded, and the page on PHP 8.1 and older explains the options.
I’m on PHP 8.2. Is the fixed version enough?
Yes, PHP 8.2.35 fixes both vulnerabilities. PHP 8.2 reaches end of life on 31 December 2026 and gets no security fixes after that date, so PHP advises planning a move to a supported version.
Should I take my site offline?
Yes, if you can’t update PHP soon. CISA advises taking PHP-based systems offline if they can’t be updated immediately, and the UK NCSC says to consider it if the interim measures aren’t possible. WordPress.org gives the same advice to people on PHP older than 8.2 who manage their own hosting.
Does maintenance mode help?
No, the maintenance modes in WordPress and Magento don’t help, because PHP reads each request before the application checks the maintenance flag. CERT-EU advises isolating internet-facing applications from public networks where you can’t patch immediately. To take a site offline, you can stop PHP-FPM and serve a static maintenance page; if you can’t go offline, rejecting every request method except GET and HEAD lets visitors browse but not log in or place orders.
Does Cloudflare or another firewall protect me?
Partly, and only for requests that pass through the firewall. Cloudflare deployed rules on all plans, including Free, and CISA lists a web application firewall as a temporary measure, but both tell you to update PHP. An attacker who finds the server’s own IP address can send requests straight to it, so the origin server should accept traffic only from Cloudflare’s IP ranges. The check looks for DNS names that point straight at the server.
Is blocking multipart/form-data uploads enough?
No, it reduces exposure while you update, and PHP says only an update is a complete solution. Every known trigger is a multipart/form-data request, so PHP’s advisory suggests blocking these at the web server or proxy if the application doesn’t use them. Note that this breaks file uploads, and that some shops send cart or checkout forms this way, so place a test order after adding the block. Remove it once PHP is updated.
Is setting session.upload_progress.enabled = 0 enough?
No, it blocks only the confirmed session paths of CVE-2026-109619 and doesn’t address CVE-2026-109618. PHP says it doesn’t block other variants, and BleepingComputer reports that PHP core developer Gina Peter Banyard warned that no mitigation fully blocks these attacks and that only the official PHP update is a lasting fix. If you use it while you update, set it in php.ini or the PHP-FPM pool (not with ini_set() or .user.ini) and restart every worker.
Is it being exploited yet?
Attack attempts have been reported, though CISA had not observed exploitation when it published its alert on 21 October 2026. Cloudflare reported early attacks at 07:43 UTC that day, before PHP released the fix at 14:00 UTC, and says attackers have been changing their payloads to get past its rules. With the fix and write-ups now public, broader exploitation is expected. The exploitation status page tracks what has been confirmed.
Is PHP2Shell in CISA’s Known Exploited Vulnerabilities catalog?
No, as of 21 October 2026 neither CVE-2026-109618 nor CVE-2026-109619 is in the catalog. CISA’s alert of the same day said it had not observed exploitation. The exploitation status page tracks what has been reported since.
How do I tell whether my site was compromised?
There is no single sign, and Wiz notes that application logs may show little because the attack runs below the application. CISA advises watching for PHP worker processes that start shells or download tools. The detection page lists signs to look for in logs and on the server, and what to do if you find one.
Can an attacker steal data without running code?
Yes, CVE-2026-109618 can also leak the server’s memory, similar to Heartbleed. Wiz says the leaked memory can include passwords, authentication tokens, API keys and certificates from other requests.
Is it only Apache mod_php, or also PHP-FPM, CGI, FrankenPHP and LiteSpeed?
All of these are affected: PHP’s advisory names PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP rates the risk highest for mod_php, where a demonstrated exploit needs no login and runs before any application code, but every setup needs the same update.
Are Docker images, FrankenPHP and products that bundle PHP affected?
Yes, anything that includes a PHP build without the fix is affected, and PHP’s advisory names FrankenPHP. The official php Docker images have tags for 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and the Docker and FrankenPHP guides explain how to update. For appliances and other products, the UK NCSC advises watching for vendor updates and points to a list of affected products kept by the Dutch NCSC. cPanel, for example, has updated the PHP behind its own interfaces, including Roundcube webmail.
What are the two vulnerabilities?
Both are use-after-free bugs triggered when a fatal error, often running out of memory, interrupts PHP during a request. In CVE-2026-109618, out-of-memory handling interrupts PHP while request data is only partly set up, and cleanup then treats that data as valid. In CVE-2026-109619, internal state from one request survives after its memory is freed, and a later request on the same worker uses it.
How severe are they?
The PHP security team rates both as critical, 9.2 under CVSS v4.0. An attacker needs no login and no action from a user. A successful attack runs code with the privileges of the PHP worker that serves the site.
Who found PHP2Shell, and when was PHP told?
Wiz credits Calif, Wiz Research and OpenAI with finding the bugs. Wiz reported the vulnerabilities to the PHP security team on 24 August 2026, and PHP released the fix on 21 October.
Why is it called PHP2Shell?
The name comes from an exploit tool that chains both bugs into one attack that needs no login. Wiz says it combined the vulnerabilities into a single exploit script it called php2shell.