Skip to main content

El Blog de IA

November 30, 2026

Artificial intelligence, explained without the jargon.

November 30, 2026

PHP vulnerability (PHP2Shell): what happened, how to protect yourself and how to update your server

The PHP vulnerability (PHP2Shell) allows code execution without logging in. Which versions it affects, how to check your server and the steps to update to a safe version.
Servidor web con un candado abierto que representa la vulnerabilidad de PHP
Servidor web con un candado abierto que representa la vulnerabilidad de PHP

The PHP vulnerability disclosed on October 21, 2026 means servers need to be updated as soon as possible: it consists of two critical flaws in the interpreter itself that, according to the PHP project, can allow an attacker to run code on a web server without logging in. It circulates under the informal nickname PHP2Shell and reaches a large part of the web, because PHP powers WordPress, Drupal, Joomla and a huge number of online stores.

This guide sums up what happened with the PHP vulnerability, who it affects, how to check your server and the steps to move to a safe version. The information was verified as of October 22, 2026 and may change in the coming days: if you manage a server, always check the official PHP advisory before touching anything.

What happened with the PHP vulnerability

On October 21, the PHP project released versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two flaws tracked as CVE-2026-109618 and CVE-2026-109619. Both score 9.2 out of 10 on the CVSS v4.0 scale, which places them in the critical category.

The first, CVE-2026-109618, comes from how PHP handles out-of-memory errors: the request can be left half-initialized and the later cleanup treats that data as if it were valid. The second, CVE-2026-109619, leaves references to data from an already freed request in memory, and another request served by the same process can use them before they are reset.

The details leaked ahead of schedule. On October 20, a message with the identifiers appeared on a forum, when the project had planned to reveal them together with the patches, according to Infosecurity Magazine. PHP’s earlier notice had already warned that it would bring the release forward if the details became public.

Date What happened
August 2026 Wiz Research says it found the first flaw on August 19 and reported it to the PHP security team on the 24th.
October 20 PHP announces a critical security release for the next day and the identifiers leak on a forum.
October 21 The patches and the official advisories from PHP, CISA (United States) and the NCSC (United Kingdom) are published.
October 22 Several security firms update their advisories with reports of attack attempts.

Affected versions and fixed versions

According to Google Cloud and Wiz, the PHP vulnerability affects every version from 5.4 up to 8.5.11. The project has only released official patches for the branches it still maintains:

PHP branch Fixed version Notes
PHP 8.5 8.5.12 Supported branch.
PHP 8.4 8.4.27 Supported branch.
PHP 8.3 8.3.36 Supported branch.
PHP 8.2 8.2.35 Reaches end of life on December 31, 2026.
PHP 8.1 and earlier No official version PHP has published minimal code backports for 7.4, 8.0 and 8.1; some distributions and LTS providers offer their own.

Watch out for distribution packages: a backported patch can keep an old version number. To know whether you are protected, compare the full package with your vendor’s advisory and don’t rely only on the number that php -v returns.

Who is at risk from this PHP vulnerability

According to the official advisory, any installation that serves web requests is at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers the danger greater with mod_php, where there is a proven exploit triggered by a single unauthenticated request, before any application code runs.

If you run a site on WordPress, WooCommerce, Drupal, Joomla, Magento or PrestaShop, the key point is this: the flaw is not in the content management system or in a plugin, but in PHP. Updating the CMS, the theme or the plugins does not fix the PHP vulnerability if the server’s interpreter remains unpatched, something that guides for online stores such as the one from Ecommerce News also stress.

Wiz also showed that memory from a PHP process can be read without ever executing code. That memory can contain passwords, tokens and API keys, so the risk is not limited to losing control of the server.

If you are an ordinary user, you don’t need to do anything on your phone or your computer: the problem is on the servers. What you can do is watch for notices from the websites and services where you have an account.

Is the PHP vulnerability already being exploited?

It depends on the source and the time. CISA said on October 21 that it had not observed exploitation when it published its alert, although it asked for immediate updates. Qualys, in an update on October 22, reports that Cloudflare and Amazon Threat Intelligence have reported attack traffic and that Patchstack has received notices from hosting providers.

In practice, you should treat the situation as active. Cloudflare said it had already deployed web application firewall (WAF) rules for the known vectors, available even on the free plan, according to Help Net Security. It is a useful layer, but it doesn’t replace the patch.

How to check whether your server has the PHP vulnerability

First, locate every PHP installation: there may be several versions side by side, containers, hosting panel packages and PHP bundled inside other programs. The output of php -v may belong to a different installation from the one serving your site.

  • Debian or Ubuntu: dpkg -l | grep php lists the installed packages.
  • Red Hat, Fedora and derivatives: rpm -qa | grep php.
  • Apache: apachectl -M | grep php (on Debian and Ubuntu, apache2ctl) shows whether mod_php is loaded.
  • PHP-FPM: php-fpm -v; the binary name varies by distribution, for example php-fpm8.3.
  • Containers: check the image tag and rebuild on an already patched base.

On shared or managed hosting you don’t have access to those commands, so ask your provider whether it has already applied the patch. According to a roundup from hosttest.es, Hetzner reported that it had updated PHP 7.4 and 8.0 through 8.5 on its web hosting and managed servers, but on VPS and dedicated servers with root access the administrator has to do it.

How to fix the PHP vulnerability: steps to update

These steps follow the recommendations of the British NCSC, PHP and Qualys. Adjust each one to your operating system and your provider.

  1. Take inventory. Locate every PHP installation, starting with servers exposed to the Internet. Don’t limit yourself to old versions: the NCSC warns that all of them may be affected.
  2. Back up. Save files and database and, if you can, test the update in a staging environment. A patch within the same branch usually carries little risk, but sites with old code deserve testing.
  3. Update with the package manager. Install the fixed version indicated by your distribution’s advisory. According to Qualys, by October 21 there were already advisories from Ubuntu, Fedora, Red Hat, Gentoo, Arch Linux and Alpine.
  4. Compiling from source. Download 8.5.12, 8.4.27, 8.3.36 or 8.2.35 from php.net and recompile. If you depend on the volunteer repository rpms.remirepo.net, PHP warned that it would not have updates that day and recommends switching to distribution packages or compiling.
  5. Containers and cloud. Rebuild the image with a patched base and redeploy; updating the host server does not fix the image.
  6. Restart the services. Restart Apache, PHP-FPM and any PHP service, because running processes may keep the vulnerable code until they are restarted.
  7. Verify. Check that the service handling your site uses the fixed version and that no old processes remain.
  8. Undo the emergency measures. If you applied memory_limit=-1, go back to a reasonable limit. Qualys warns that, with PHP already patched, a process can end abruptly when it reaches its memory limit, so test how your application behaves under pressure.

What to do if you can’t update today

PHP insists that only updating solves the problem completely. If you need to buy time against the PHP vulnerability, these measures reduce exposure to specific attack paths, but they do not make an unpatched installation safe:

  • Set session.upload_progress.enabled=0 in php.ini, in the PHP-FPM pool or in the server configuration, and restart all processes. Setting it with ini_set() or in .user.ini does not work.
  • On PHP 8.5, set fatal_error_backtraces=0 at administrator level and restart.
  • Fix memory_limit=-1 so that applications cannot change it (with php_admin_value, for example). It is temporary and increases the risk of resource exhaustion.
  • Limit request size: post_max_size=8M if there are no file uploads and 32M if there are, with upload_max_filesize below it. Apply equivalent limits on the web server or the proxy.
  • On PHP-FPM, consider pm.max_requests=1 if the performance cost is acceptable.
  • Put a web application firewall (WAF) in front, knowing that it is an extra layer and not a patch.

What to do if you use PHP 8.1 or earlier

This is the most awkward case. PHP does not publish binaries or fixed versions for those branches, but it has made minimal code backports for 7.4, 8.0 and 8.1 available for anyone who compiles from source or has no LTS provider. You have three paths: ask your distribution or support provider for the fixed package, apply the backport, or jump to a supported branch.

In the medium term, the sensible way out is to migrate. And watch out for 8.2: although it already has a patch, it stops receiving security fixes on December 31, 2026, so it may be worth going straight to 8.4 or 8.5 if your application allows it. This PHP vulnerability makes clear how costly it is to stay on an unsupported version.

How to tell if you’ve been attacked with the PHP vulnerability

These flaws act below the application, so your site’s logs may give little away. Wiz points to a few signs that justify investigating, although none of them proves an intrusion on its own:

  • Unusual multipart requests followed by memory limit errors or repeated HTTP 500 responses.
  • PHPSESSID cookies in responses that are abnormally long or have a strange format.
  • Unexplained restarts of PHP processes.

If your server was exposed without a patch, my advice is to go further: check recently modified files and look for scripts you don’t recognize, since the NCSC recommends searching for backdoors installed by an attacker. Because PHP memory can contain secrets, consider rotating passwords, API keys and tokens. If you don’t feel confident, ask an incident response provider for help.

The role of AI in this PHP vulnerability

There is one detail of particular interest on an artificial intelligence blog. Wiz says it used Gemini 4 Argon, GPT-5.6 Sol and its own Wiz Atlas tool during the research, and claims that AI models greatly reduced the work needed to turn old flaws into an exploit that works across different environments.

It should be read with caution: it is the account of a company that sells security and that was behind the discovery, and Google DeepMind presents it as an example of AI for defense. What is verifiable is that PHP, CISA and the NCSC are asking for patching. If Wiz’s thesis is correct, complex flaws will no longer be protected by their difficulty, which is why updating quickly matters so much. If you are interested in how AI agents are being used in other areas, see our guide to AI agents available in Spain.

Tips to avoid being exposed again

  • Turn on automatic security updates in the operating system and subscribe to the notices from your distribution and from PHP.
  • Keep only supported versions. The PHP vulnerability reaches versions more than ten years old; mark your branch’s end-of-life dates in your calendar.
  • Reduce what is exposed. Don’t leave admin panels or diagnostic pages such as phpinfo() public, and disable functions you don’t use.
  • Put a WAF or CDN in front as an additional layer, not as a substitute for the patch.
  • Separate and limit. Use a low-privilege user for PHP and keep keys out of the code whenever you can.
  • Off-server backups that have been tested, so you can restore if something goes wrong.
  • Monitor 500 errors, memory spikes and restarts of PHP processes.
  • Prepare a contingency plan. If your business depends on an external provider, what we cover in our analysis of the Revolut outage and what to do if you can’t pay will help.

In short, the PHP vulnerability requires action today: locate your installations, install the fixed version, restart the services and check whether there was an intrusion. Until you can, apply the mitigations from the official advisory and consider isolating the service.

Frequently asked questions

What is PHP2Shell?

It is the informal, unofficial nickname for the PHP vulnerability made up of CVE-2026-109618 and CVE-2026-109619. It does not come from the PHP project.

Is updating WordPress enough?

No. The PHP vulnerability is in the interpreter, not in WordPress or its plugins. PHP has to be updated on the server, or you have to ask your hosting provider to do it.

Which PHP version should I install?

8.5.12, 8.4.27, 8.3.36 or 8.2.35, depending on your branch, or the fixed package from your distribution, which may carry a different number because of backports.

Do I need to restart the server after updating?

You need to restart Apache, PHP-FPM and any PHP service so that the processes use the fixed code. There is no need to reboot the whole machine unless your provider says so.

Does it affect me if I’m only a website visitor?

You don’t need to do anything on your device. However, if a site you use were compromised, your account data could be exposed, so it’s worth watching for notices from those services.

The models that helped find these flaws are also the ones that most need watching: OpenAI has decided to train its own without internet access after several incidents, as we reported in OpenAI will train its models without internet.

Sources

  1. PHP.net: Security advisory, critical remote code execution vulnerabilities (October 21, 2026)
  2. CISA: Critical Vulnerabilities in PHP Require Immediate Patching (October 21, 2026)
  3. NCSC (United Kingdom): Critical security issue affecting PHP (October 21, 2026)
  4. Wiz Research: PHP2Shell, AI uncovers critical RCE vulnerabilities (October 21, 2026)
  5. Qualys: PHP2Shell, PHP patches two critical RCE vulnerabilities (updated October 22, 2026)
  6. Help Net Security: PHP2Shell, critical PHP vulnerabilities patched (October 21, 2026)
  7. Google Cloud: Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619
  8. Infosecurity Magazine: Critical PHP vulnerabilities leaked ahead of scheduled security patches
  9. hosttest.es: Critical PHP vulnerability, what web hosting customers need to know
  10. Ecommerce News: PHP2Shell, urgent guide for online stores

You may also like

Tecla Copilot en el teclado de un portátil con Windows 11

Free Copilot: what Microsoft Copilot is and how to use it in Spanish

Microsoft Copilot is still free, but since August 2026 it requires an account. How to use it in Spanish on the web, Windows, mobile
Rascacielos de Hangzhou, la ciudad china donde tiene su sede DeepSeek, vistos desde el Lago del Oeste

DeepSeek: what it is, how to use it for free in Spanish, and whether it’s safe

DeepSeek is the Chinese chatbot you can use for free and in Spanish. We explain how to get started, which model it runs now,
Paleta de pintor y pinceles, Leonardo AI para crear imágenes con IA

Leonardo AI: What It Is, How to Use It for Free and How Much It Costs (2026)

What Leonardo AI is, what it is for, what the free plan includes, the price of each plan and how to create AI images

Most read

El Blog de IA
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.