PHP2Shell: Is the Server Behind Your Website Patched, and What Do You Do If It Is Not?

On 21 October 2026 the PHP project released emergency fixes for two flaws, known together as PHP2Shell, that let an attacker run code on a web server without logging in, before the website’s own code is reached. PHP serves about seven in ten websites, including every WordPress, Laravel, Magento and Joomla site, so the question for a company is not whether it uses PHP but whether whoever runs its server has updated. Here is what happened, how to tell if your server is safe, and what to do today if it is not.

Cloud & DevOps8 min readBy Mohsin Amer Riaz

The short answer: your server is patched if it runs PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a build from your hosting provider or Linux distribution that carries the fix under an older version number. If it runs anything else, it is exposed, and updating the website, its theme or its plugins changes nothing, because the flaws are in PHP itself. Update the server today, restart every PHP worker, and if an update is not possible this week, take the application off the public internet until it is. Attack attempts were seen before the fixes were published, so a server that was unpatched for any time after 21 October 2026 also needs a check for signs of compromise, not only an update.

What Happened, and When

Date (UTC)What happenedSource
20 October 2026The PHP security team announces a critical release for the next day, for two flaws rated 9.2 of 10 on CVSS v4.0, after the existence of the flaws and their identifiers appear on social media ahead of the planned datePHP, watchTowr
21 October, 03:02Cloudflare switches on firewall rules against the known attack methods for every customer, including free plans, about nine hours before the fixes are public, and reports early attack attempts the same morningCloudflare
21 October, 13:40PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 are released with the advisory for CVE-2026-109618 and CVE-2026-109619, plus minimal source patches for PHP 7.4, 8.0 and 8.1, which the project no longer supportsPHP, EU joint statement
21 OctoberThe UK’s National Cyber Security Centre tells organisations to update immediately or take affected systems offline; the European Commission, ENISA, CERT-EU and Europol issue a joint statement; Canada’s Cyber Centre publishes an alertNCSC, ENISA, Cyber Centre
21 OctoberwatchTowr reports exploitation attempts against both flaws on its honeypot networkwatchTowr
23 OctoberPHP publishes an informational advisory for a third, related flaw, CVE-2026-115560, in the session upload progress feature, with a fix promised in the next regular release and a configuration change to apply meanwhilePHP, Cyber Centre

The flaws were found by researchers at Calif, Wiz, OpenAI and Quarkslab and reported to PHP for a coordinated release. Both sit in how PHP handles a request that ends abnormally. In the first, a request that pushes PHP out of memory part-way through its setup leaves internal data half-built, and the cleanup code trusts it. In the second, state from one request outlives the memory it points to, and the next request handled by the same worker acts on the leftovers. Either can be turned into code running on the server with the web server’s permissions, with no account and no password. PHP rates the risk highest where Apache runs PHP as a module (mod_php), because a demonstrated attack succeeds before the application’s code runs at all, but PHP-FPM, php-cgi, LiteSpeed and FrankenPHP are all in scope.

Who Is Exposed

PHP is the server-side language of 69.2% of websites whose language is known, according to W3Techs on 25 October 2026. Among those sites, 65.5% run version 8, 26.8% still run version 7 and 7.7% run version 5. The last two groups have no official fix: PHP 7.4, 8.0 and 8.1 received source patches only, for distributions and hosting companies to build into their own packages, and PHP 7.3 and older, including version 5, received nothing. A site on those versions is only safe once its hosting provider has shipped a patched package, or once it moves to a supported branch.

In practice this is a question for whoever administers the server, not the person who edits the website. On shared and managed hosting the provider applies the update; cPanel shipped fixed PHP packages in its EasyApache 4 release and backported the fix to its PHP 7.4, 8.0 and 8.1 packages, and other panels and distributions followed on their own timetables. Many of those packages keep the old version number, so a server that still reports PHP 8.3.35 may already be fixed. The package changelog, or a note from the provider, is the evidence to look for, not the version string alone.

Is It Being Exploited?

The honest answer is that attempts are real and confirmed compromises are not yet documented publicly. Cloudflare reported attack traffic against both flaws on the morning of 21 October and said attackers were changing their payloads to get past its rules. watchTowr reported exploitation attempts on its honeypots from the same day. Canada’s Cyber Centre said on 21 October that a proof of concept exists and that it had not identified active exploitation at that time, and as of its 23 October catalogue the US Cybersecurity and Infrastructure Security Agency had not added either flaw to its list of known exploited vulnerabilities. None of this is a reason to wait: for a flaw that needs no login and works before the application loads, the window between a public proof of concept and automated mass exploitation is normally days.

What to Do Today

  1. List every system that runs PHP. Websites, intranets, customer portals, ERP and CRM installations such as ERPNext or SuiteCRM, and appliances that bundle PHP without saying so. The Dutch NCSC keeps a public list of products with a PHP dependency. Start with anything reachable from the internet.
  2. Check the version properly. Ask the hosting provider in writing which package is installed and whether it contains the fix for CVE-2026-109618 and CVE-2026-109619. On a server you control, read the package changelog rather than the version number.
  3. Update and restart. Install the fixed package, then restart PHP-FPM, Apache or LiteSpeed so every worker runs the new code. A package installed without a restart leaves the old workers serving traffic.
  4. Apply the 23 October change as well. Set session.upload_progress.enabled=0 and restart the workers. PHP recommends it until the fix for CVE-2026-115560 ships in the next regular release, and it also narrows the second of the original flaws.
  5. If you cannot update this week, reduce exposure. PHP lists partial measures (a low post_max_size, request limits at the web server or proxy, container memory limits) and states plainly that none of them makes an installation safe. A firewall such as Cloudflare’s blocks the known methods but not traffic that reaches the server directly, and not methods it has not seen. The NCSC’s advice for a system that cannot be patched is to take it offline.
  6. Look for compromise. For any server that was reachable while unpatched, review web server and application logs since 20 October for unusual requests and errors, check for new files in writable directories, new scheduled tasks, new administrator accounts and unexpected outbound connections, and run the host’s malware scanner. Change credentials that lived on the server if anything is found.
  7. Plan the move off PHP 7. A site on PHP 7 or 5 depends on its host backporting every future fix. The next flaw will come, and the fix for it may not.
PHP branchFixed versionStatus
8.58.5.12Supported
8.48.4.27Supported
8.38.3.36Supported
8.28.2.35Supported until 31 December 2026
7.4, 8.0, 8.1None from PHPSource patches only; a vendor package or an upgrade is required
7.3 and olderNoneNo fix; upgrade

Where SoftwareBiz fits. Our managed cloud and DevOps service keeps the servers we run for clients on supported versions and applies security releases within an agreed window, with the restart and the log review done as part of the same change. Where a server may have been reachable while unpatched, our cloud security and compliance team runs the compromise check described above and hardens what it finds. If nobody in your company can say today which version of PHP your website runs on, or who is responsible for updating it, that is the finding our architecture and performance audit exists to make, with a written list of every system, its owner and its support status. For a site stuck on PHP 7 because its theme or framework cannot move, our website design and development team plans the upgrade or the rebuild, so the next release lands on a supported platform.

What This Means for a Company That Buys Hosting

Most companies in Pakistan, the Gulf and the UK buy their website hosting as a service and have never had a reason to know what runs underneath it. PHP2Shell is a reason. The provider who patched within hours on 21 October and told customers so is worth keeping; the provider who has not answered the question by now is telling you something too. Ask for the package version in writing, ask when it was applied, and ask what the restart and the log review found. Those three answers tell you whether the service you pay for includes security, or only uptime.

Questions Companies Are Asking About PHP2Shell

My WordPress site is fully updated. Is it safe?

Not because of that. WordPress, its themes and its plugins run on PHP, and the flaws are in PHP itself. The site is safe only when the server’s PHP has been updated to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to a provider’s package that contains the fix, and the PHP workers have been restarted.

The server says PHP 8.3.35. Does that mean it is unpatched?

Not necessarily. Hosting providers and Linux distributions often apply a security fix without changing the version number. Ask the provider for the package name and its changelog, or read it yourself on a server you control. If neither confirms the fix for CVE-2026-109618 and CVE-2026-109619, treat the server as unpatched.

We are on PHP 7.4. What are our options?

PHP itself published only source patches for 7.4, 8.0 and 8.1, so you depend on your provider or distribution building them into a package; cPanel has done so, and others have followed. Confirm that in writing. Then plan the move to PHP 8.3 or 8.4, because every future flaw in PHP 7 will leave you in the same position.

Does Cloudflare or a web application firewall protect us?

It blocks the attack methods it knows about, and Cloudflare turned its rules on for every customer before the fixes were public. It does not fix the flaw, it does not see traffic that reaches your server directly, and Cloudflare itself describes the rules as a stopgap until the server is updated.

How do we know whether we were attacked before the update?

Review the web server and application logs from 20 October onwards for unusual requests, failed requests and errors, check for new files in writable folders, new scheduled tasks, new administrator accounts and unexpected outbound connections, and run the host’s malware scanner. If you find any of these, treat the credentials that lived on that server as exposed and rotate them.

Find Out Today Whether Your Servers Are Patched

Tell us which websites and systems you run and who hosts them. Within one working day we will confirm the PHP version and fix status of each, say what needs updating or checking, and quote the work to do it.

Prefer a conversation? Message us on WhatsApp

Loading the form. You can also email sales@softwarebiz.co.