Critical PHP security Oct 2026

Two critical PHP flaws, dubbed php2shell, could let attackers take over web servers. What they are and what to do about them.

Published: 23 October 2026

Overview

A group of cyber security researchers and organisations disclosed two vulnerabilities within PHP this week, which they warned could have the potential to upend sites across the internet.

Cyber firms Wiz and Calif said the flaws, coined "php2shell", are inherent in the language itself, with versions of PHP released over the last decade affected.


Details

PHP is the programming language behind a huge share of websites. The php2shell site puts it at around 70%, including WordPress, Drupal and MediaWiki. The two flaws sit in PHP itself, not in a plugin or theme, so a site can be fully up to date and still be exposed if the PHP underneath it is not. Updating a website's application does not update the PHP it runs on.

Both flaws are rated 9.2 out of 10 for severity (CVSS), which is "critical". The UK's National Cyber Security Centre (NCSC) has issued an alert, saying the issue "may allow attackers to execute commands on any web server running PHP".

Vulnerability 1: CVE-2026-109618

In plain terms: an attacker can make PHP run out of memory part way through handling a request. PHP is left in a half-finished, corrupted state, and its clean-up then treats that damaged information as if it were fine. Under certain conditions an attacker can use this to run their own commands on the server, without needing to log in.

The researchers demonstrated this against WordPress, Drupal and Joomla.

Vulnerability 2: CVE-2026-109619

In plain terms: PHP reuses the same worker process for many visitors, one after another. Some information from an earlier visitor's request can be left behind after the memory holding it has been released, and a later request can end up using it. An attacker can exploit this to read data from the server's memory, or in some cases to run their own commands, again without logging in.

The researchers demonstrated running commands against WordPress and Drupal, and reading server memory in a way that does not depend on the website application at all.

What an attacker could do

  • Take control of a website and run their own code on the server
  • Read sensitive information held in the server's memory, which can include passwords and API keys
  • Use a hijacked site to run phishing pages or spread malware to its visitors

Who is affected

Almost every version of PHP going back to 5.4 (released in 2012) is affected by at least one of the two flaws. The NCSC advises all organisations running PHP to act, including those running older versions. PHP is also built into other products, so appliances and services you do not think of as "PHP" may be affected. Check with your vendors.

Examples in the UK

Running PHP does not by itself mean a site was compromised, and most of the disruption so far has been precautionary. According to The Register, a UK minister told the House of Lords that 32 government services were taken offline and four were partly disrupted, mostly "from precautionary measures while patches are applied". The services named in reports include:

  • The Office for Budget Responsibility (OBR)
  • The DVLA
  • Police services (no forces named)
  • Councils including Edinburgh, Oxford, Bristol, Lambeth and Barnet

The UK government said there was no confirmed compromise of central government systems.

Around the world

  • Netherlands: Several Dutch sites went offline as a precaution, including the tech news site Tweakers, the House of Representatives, the Dutch NCSC and Security.NL.
  • Singapore: The Cyber Security Agency of Singapore issued an alert telling organisations to "patch immediately". It reports widespread exploitation attempts and several public exploits, but names no Singapore organisations or incidents.
  • Popular software: Calif reported code execution without a login on current releases of WordPress, Drupal, Joomla, Magento, MediaWiki, Roundcube, phpMyAdmin, Nextcloud, Laravel, Symfony and WHMCS. These are tools used by millions of sites worldwide. They are examples of what runs on PHP, not a list of confirmed victims.

There has not been a published count of how many sites worldwide are exposed.

Who found it

The flaws were reported by researchers at Wiz, OpenAI (Codex Security) and Calif, and the fix was coordinated with the PHP security team and Google. The php2shell site says AI tools were used during discovery, exploit development and checking the patches.

Is it being exploited?

Reports indicate that exploitation attempts began before the vulnerabilities were publicly disclosed. On 22 October, The Register reported that AWS had observed exploitation four days before public disclosure, while Cloudflare had recorded millions of attempts to weaponise the flaws.

Not every attempt will succeed, and the reliability of individual publicly circulating exploit tools varies. However, the underlying vulnerabilities are real, and researchers have demonstrated unauthenticated code execution under affected configurations.

Do not interpret the failure of a particular proof of concept, or the absence of obvious errors in your logs, as evidence that a server is safe. Prioritise patching, investigate potential compromise where appropriate, and follow the NCSC's guidance.

What to do

Update PHP. The php2shell site is clear that upgrading is the only complete fix. The fixed versions, released on 21 October 2026, are:

PHP branchFixed in
8.28.2.35
8.38.3.36
8.48.4.27
8.58.5.12

After installing the update, restart Apache, PHP-FPM and any other long-running PHP processes so the new version is actually in use. If you are on an older branch (7.x, 8.0 or 8.1), move to a supported version.

The NCSC recommends, in order:

  1. Find all your PHP installations, starting with those facing the internet. Do not limit this to old versions.
  2. Update, internet-facing systems first.
  3. If you cannot update yet, apply the temporary mitigations published by the PHP Foundation.
  4. If you cannot do that quickly either, consider taking the system offline until it is fixed.
  5. If it must stay online unpatched, check it for signs of compromise and backdoors.
  6. Watch for updates from your third-party suppliers.

Temporary mitigations may reduce exposure while an update is being prepared, but their effectiveness depends on the PHP version, server configuration and vulnerability being addressed. Follow the PHP project's specific mitigation guidance rather than relying on generic measures such as worker recycling or request-size limits. These measures do not replace installing a fixed build. If you cannot patch or apply the recommended mitigations promptly, consider taking the affected system offline.

If your site was built by someone else

Most of the advice above is for people who run their own servers. If a web agency or freelancer built your site and it sits on a shared host such as GoDaddy or IONOS, you are not expected to patch PHP yourself, and you cannot update a hosting company's servers anyway.

What you do not need to worry about

  • You do not need to rebuild your site, change your design, or install anything.
  • You do not need to update WordPress, your theme or your plugins to fix this. Those updates are good practice, but they do not change the PHP underneath them.
  • On standard shared hosting, the hosting company looks after the servers and PHP, and is responsible for applying the fix. Large hosts are generally expected to do this as a matter of course.
  • Your visitors do not need to do anything.

What is still worth doing

  1. Do not assume it has been done. I could not find a confirmation of GoDaddy's or IONOS's patch status, so check your own provider's status page, email or support notices for a statement about PHP2Shell.

  2. Ask your host or developer to confirm in writing that the PHP your site runs on has been updated to a fixed version (8.2.35, 8.3.36, 8.4.27, 8.5.12 or later). A short message is enough, for example:

    Please confirm that the PHP version running on [your domain] has been updated for the PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619), and let me know if there is anything I need to do.

  3. Check which PHP version your site uses. Many hosting control panels let you choose the PHP version for each site. If yours is an older one (7.x, 8.0 or 8.1), it will not get an official fix, and the host may not be able to patch it. Ask your developer or host to move the site to a supported version, and ask them to test the site first because older sites can break on newer PHP.

  4. Ask your developer whether they manage the server. If your site is on a server your agency set up and runs for you, such as a virtual private server (VPS) or a cloud server, the host will not patch it for you. The agency has to. This is the case most likely to be missed.

  5. Check the other places PHP might be hiding. Email systems, booking tools, intranets and similar products may run PHP behind the scenes. Ask the suppliers of anything that is public-facing.

  6. Know the warning signs. If your site suddenly shows pages you did not create, redirects visitors somewhere strange, goes down repeatedly with server errors, or your host reports unusual activity, contact your host and developer straight away.

Keep any reply you get from your host or developer. If you are regulated or hold customer data, it is useful evidence that you acted promptly.

Checking a site

OpenAI has published a free PHP version checker. It reads the PHP version a site advertises, or a local PHP installation, and reports whether it is OK, POTENTIALLY VULNERABLE or UNKNOWN. It sends no attack traffic. Be aware that an OK only reflects the advertised version, not whether the server is genuinely patched, and a site that hides its PHP version will show UNKNOWN.

Links


Summary

  • What happened: Two critical flaws, CVE-2026-109618 and CVE-2026-109619 (together "php2shell"), were found in PHP itself. Both are rated 9.2 out of 10, and they can let an attacker run commands on a web server without logging in.
  • Who is affected: Almost every PHP version back to 5.4. Updating WordPress or another application does not fix it, because the problem is in the PHP underneath.
  • The fix: Update PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or later, then restart the web server and PHP processes. Older branches (7.x, 8.0, 8.1) get no official fix, so move to a supported version.
  • Not yet patched? Apply the PHP Foundation's temporary mitigations, which reduce the risk but are not a fix. The NCSC says to consider taking the system offline if you cannot do even that.
  • If a third party hosts or runs your site: You do not need to rebuild anything, but do not assume it has been patched. Ask your host or developer to confirm in writing, and check that your site is not on an unsupported PHP version or on a server your agency has to patch itself.
  • Keep it in proportion: Attack attempts have been seen and several organisations took services offline as a precaution, but no confirmed compromise has been reported in the sources above, and Sansec says the public exploits do not work against a default PHP installation. That is not a reason to wait.