21 October 2026

PHP2Shell: Two critical vulnerabilities in PHP, remote code execution. Update now to PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35.

PHP's official advisory confirms two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that allow unauthenticated remote code execution. Who's at risk, how to update, the official mitigations, and how we're patching with Ansible.

PHP Alert: A robotic arm patches servers on a conveyor belt, clock at 16:00 PM, siren on.

On October 20, 2026, the PHP security team published a rarely seen notice: a special security release, scheduled for Wednesday, October 21, at 2:00 PM UTC (14:00 PM GMT) , to fix two critical vulnerabilities , both with a CVSS v4.0 score of 9.2 . A few hours earlier, some details had leaked online before the embargo ended, and the flaws have been circulating among researchers ever since under the name PHP16Shell.

TurboLab provided a comprehensive report , and the news was picked up by major international news outlets and security firms. In this article, we'll break down what's confirmed, what's not yet confirmed, what to do immediately, and what we're doing.

Updated October 21, 16:00 PM. PHP has published the official advisory and the fixed versions: PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35 . The two vulnerabilities allow unauthenticated remote code execution, and the attack code is already public: update now.

The official PHP notice

On October 21, the PHP project released versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 along with a warning with the unmistakable title: Security advisory: Critical remote code execution vulnerabilities, update now . The releases fix two critical vulnerabilities that could allow unauthenticated remote code execution, and all PHP users are urged to update immediately.

Who is at risk?

According to the advisory, all PHP installations that serve web requests are at risk : PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. The risk is considered highest for mod_php , for which there is a demonstrated exploit where an unauthenticated request can trigger the attack before any application code is executed.

Translation: It doesn't matter how up-to-date WordPress, plugins, or the CMS are. The problem lies in the interpreter that runs them.

The two vulnerabilities

  • CVE-2026-109618, code execution via out-of-memory corruption. Memory exhaustion handling can interrupt PHP while the request's internal data is only partially initialized. End-of-request cleanup can then treat that invalid data as if it were valid.
  • CVE-2026-109619, Code execution via deprecated global state. Internal state tied to a request can survive after the memory containing it has been freed. A subsequent request handled by the same process can use that state before normal initialization clears it.

The analyses published this morning, which identified the session.upload_progress function, therefore described one of the confirmed paths to the second vulnerability, not the only one.

How to update

  • Please upgrade to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35, depending on the branch you're using. Windows sources and packages are available on the PHP download page.
  • Linux Distributions and LTS Vendors received patches early: check with your vendor for updated packages.
  • PHP 8.1 and earlier They no longer receive updates from the PHP project. Some distributions and LTS providers offer ported fixes for older versions; please check with your provider or upgrade to a supported version. Given the severity of the issue, the PHP security team has provided minimal source code fixes for PHP 7.4, 8.0, and 8.1 for those who compile PHP themselves or don't have access to an LTS provider.
  • Who uses the rpms.remirepo.net repository?, maintained by volunteers and widely used on Red Hat, AlmaLinux and Rocky Linux, is encouraged by PHP to switch to the distribution's packages or compile from sources in order to be able to update immediately: according to the notice, the repository will not have updates today.

If you can't update right away

The warning is very clear: only updating is a complete solution . The following measures reduce exposure to specific attack paths, but they do not make an installation secure.

For CVE-2026-109618, out-of-memory corruption:

  • set up memory_limit=-1 in a way that applications cannot overwrite, for example with php_admin_value in the PHP-FPM pool or Apache configuration, and ensure that no pool, folder, or application resets a finite limit. This eliminates controllable failures due to PHP's memory limit, but a lower-level allocation error can still reach the vulnerable path;
  • set a post_max_size Bass: 8M for applications that do not require file uploads, 32M if uploads are necessary, keeping upload_max_filesize less than post_max_size. Also consider web server or proxy level limits on decoded request size, number of fields, multiparts, number of headers and nesting depth, which also apply to requests without a Content-Length usable;
  • Use a container- or cgroup-level memory limit as a barrier to service availability, preferably with a policy that only kills the affected process. No use in its place RLIMIT_AS o RLIMIT_DATA, which can actually cause vulnerable allocation failure.

For CVE-2026-109619, global status is obsolete:

  • set up session.upload_progress.enabled=0 and restart all processes. The setting must be set to php.ini, in the PHP-FPM pool or server configuration, i.e. where it applies before processing the request: immense with ini_set() nor with the files .user.iniBlocks confirmed session-related paths, but not other variants;
  • su PHP 8.5, setting up fatal_error_backtraces=0 and restart all processes. Only block the confirmed path related to fatal error backtraces;
  • Remove invalid or deprecated settings applied on a per-request basis that generate diagnostic messages before initialization. Hide them with error_reporting, display_errors or with the operator @ it's not necessary;
  • fix fatal errors and execution timeouts that an attacker can cause, including those in callbacks, upload and import processing, and cleanup operations.

Exploit already in circulation

Already on the morning of October 21st, before the official release, demo code capable of exploiting the vulnerabilities had appeared online, reported by several cybersecurity outlets. The official announcement confirms the existence of a proven exploit. With the fixes now public, comparing the before-and-after code becomes even easier: it's reasonable to expect large-scale automated scans and attacks in the coming hours and days.

The following sections describe the situation on the morning of October 21, before the official announcement, and remain as a chronicle of how the story developed.

What was confirmed before the release

There's only one official source: the notice published on the PHP website. It says exactly this:

  • exist two critical vulnerabilities, both evaluated 9.2 of 10 with the CVSS v4.0 system;
  • the release that fixes them is scheduled for October 21, 2026, at 14:00 PM UTC;
  • the team reserves the right to bring forward the release if details become public or if evidence of active exploitation emerges;
  • technical details, affected versions and corrected versions will only be published together with the release;
  • All PHP users are invited to get ready now to update as soon as patches are available.

Such a preemptive warning, with a release date and time announced in advance, is something the PHP project reserves for truly serious cases. It's a signal that should be taken seriously.

What was said before the release

A lot of information has accumulated around the official announcement, coming from leaks and security firms. These are useful for understanding the scope of the problem, but they should be read for what they are: unverified predictions from the PHP project.

  • The name PHP2Shell It is circulating among researchers, but does not appear in the official press release.
  • The identifiers CVE-2026-109618 and CVE-2026-109619 They have been reserved, but currently have no public description, and PHP's release does not mention them.
  • The nature of the flaws: According to watchTowr, these are remote code execution (RCE) vulnerabilities, meaning an attacker can execute commands on the server. The company claims to have reproduced one of the two vulnerabilities, without disclosing details.
  • The versions involved: This refers to PHP 5, 7, and 8. If true, this would affect virtually every version of PHP in use over the past fifteen years.
  • The risk of obsolete versions: Patches should only be available for still-supported branches of PHP 8. Users of PHP 5, PHP 7, or out-of-support versions of PHP 8 may be left without an official fix.
  • The score: Some sources talk about CVSS 10, against the 9.2 declared by PHP.

When this article was first published, there were no active exploits or public exploits. Within a few hours, the situation changed: as explained above, public demo code appeared. And several analysts expect mass automated attacks very soon after the patches are released: once the fixes are public, comparing them with previous code allows them to understand the problem and build an attack very quickly.

What is confirmed by the official PHP advisory and what is reported but not confirmed about PHP2Shell vulnerabilities
What we know and don't know about two critical PHP vulnerabilities, ahead of the patch release.

Because it concerns practically everyone

If the vulnerability is in the PHP engine and not in a single application, the scope is enormous. PHP powers WordPress, WooCommerce, PrestaShop, Magento, Joomla, Drupal, OpenCart, numerous management software, user areas, control panels like cPanel and Plesk, and a host of software that doesn't even declare it uses it.

It doesn't matter how updated WordPress is or how well-maintained the plugins are: if the problem is in the interpreter that runs them, protection must come from updating PHP itself. And this is an update that, for most sites, depends not on the site administrator but on the server administrator.

The most sensitive case is that of forgotten servers: old installations with PHP 5 or PHP 7, sites never migrated, shared hosting no longer maintained, test environments exposed to the Internet. These are precisely the ones that risk never receiving an official fix, and will be the first targets of automated attacks.

What to do, besides updating

Updating remains the top priority. There are a few things you should do right away.

  • Take inventory. Record every server and site using PHP, with the exact version and how it is installed: distribution packages, external repositories, control panels, containers, hand-compiled versions.
  • Prepare the update procedure. Who updates, on which servers, in what order, with what post-update checks, and what rollback plan in case of problems.
  • Prioritize exposed systems. First, public sites, e-commerce sites and servers that host many sites; then internal environments.
  • Check your backups. That they exist, that they are recent, that they are stored off the server and that we know how to restore them.
  • Deal with outdated versions. If you have sites running PHP 5 or PHP 7, now's the time to plan your migration to a supported version of PHP 8. In the meantime, consider limiting your exposure.
  • Follow official sources only. PHP's announcement, security advisories from your Linux distribution, and your vendor. Don't act on rumors or alleged exploits posted on social media.

After the release, in addition to the update, it is a good idea to keep an eye out for signs of a possible compromise: system processes started by PHP processes, new files in the site folder, users or scheduled tasks that were never created.

Six things to do before PHP patches are released: inventory, procedure, priority, backup, obsolete versions, official sources
Upgrading is the only complete solution: everything else reduces risk.

What we are doing in Managed Server

We're already working with Ansible , the automation tool we use to manage system configuration, to patch all the systems we manage. The playbooks are ready to deploy the correct PHP versions to all servers in a coordinated manner as soon as they're available, without having to intervene machine by machine.

It's precisely in situations like this that the difference between a structured and manually managed infrastructure becomes clear: when a critical vulnerability affects a component present everywhere, the time between the release of the patch and the update of the last server is what separates a protected system from one exposed to automated attacks.

For customers with unsupported PHP versions, we will evaluate on a case-by-case basis what actions to take and migrate to a supported PHP 8 branch.

If your site isn't hosted by us and you're not sure who will be updating PHP on your server, and when, it's time to ask. If you need help with inventory, updates, or migration from outdated versions, our Linux system support is available.

Updates

The PHP project has published the official release and announcement, which are included at the beginning. We will update this article with any new official information.

Sources

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

DISCLAIMER, Legal Notes and Copyright. RedHat, Inc. holds the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of the AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. holds the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt; Oracle Corporation holds the rights to Oracle®, MySQL®, MyRocks®, VirtualBox®, and ZFS®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; PostgreSQL® is a registered trademark of PostgreSQL Global Development Group; SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc.; KeyDB® is a registered trademark of EQ Alpha Technology Ltd.; Typesense® is a registered trademark of Typesense Inc.; REDIS® is a registered trademark of Redis Labs Ltd; F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB; HAProxy® is a registered trademark of HAProxy Technologies LLC; Traefik® is a registered trademark of Traefik Labs; Envoy® is a registered trademark of CNCF; Adobe Inc. owns the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; Shopware® is a registered trademark of Shopware AG; OpenCart® is a registered trademark of OpenCart Limited; Automattic Inc. holds the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert owns the rights to Drupal®; Shopify® is a registered trademark of Shopify Inc.; BigCommerce® is a registered trademark of BigCommerce Pty. Ltd.; TYPO3® is a registered trademark of the TYPO3 Association; Ghost® is a registered trademark of the Ghost Foundation; Amazon Web Services, Inc. owns the rights to AWS® and Amazon SES®; Google LLC owns the rights to Google Cloud™, Chrome™, and Google Kubernetes Engine™; Alibaba Cloud® is a registered trademark of Alibaba Group Holding Limited; DigitalOcean® is a registered trademark of DigitalOcean, LLC; Linode® is a registered trademark of Linode, LLC; Vultr® is a registered trademark of The Constant Company, LLC; Akamai® is a registered trademark of Akamai Technologies, Inc.; Fastly® is a registered trademark of Fastly, Inc.; Let's Encrypt® is a registered trademark of the Internet Security Research Group; Microsoft Corporation owns the rights to Microsoft®, Azure®, Windows®, Office®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®; Apache® is a registered trademark of The Apache Software Foundation; Apache Tomcat® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group; Docker® is a registered trademark of Docker, Inc.; Kubernetes® is a registered trademark of The Linux Foundation; OpenShift® is a registered trademark of Red Hat, Inc.; Podman® is a registered trademark of Red Hat, Inc.; Proxmox® is a registered trademark of Proxmox Server Solutions GmbH; VMware® is a registered trademark of Broadcom Inc.; CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV; Grafana® is a registered trademark of Grafana Labs; Prometheus® is a registered trademark of The Linux Foundation; Zabbix® is a registered trademark of Zabbix LLC; Datadog® is a registered trademark of Datadog, Inc.; Ceph® is a registered trademark of Red Hat, Inc.; MinIO® is a registered trademark of MinIO, Inc.; Mailgun® is a registered trademark of Mailgun Technologies, Inc.; SendGrid® is a registered trademark of Twilio Inc.; Postmark® is a registered trademark of ActiveCampaign, LLC; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Hetzner® is a registered trademark of Hetzner Online GmbH; OVHcloud® is a registered trademark of OVH Groupe SAS; Contabo® is a registered trademark of Contabo GmbH; IONOS® is a registered trademark of IONOS SE; International Business Machines Corporation owns the rights to IBM® and IBM Cloud®; Terraform® is a registered trademark of HashiCorp, Inc.; Ansible® is a registered trademark of Red Hat, Inc.; cURL® is a registered trademark of Daniel Stenberg; Facebook®, Inc. owns the rights to Facebook®, Messenger® and Instagram®. This site is not affiliated with, sponsored by, or otherwise associated with any of the above-mentioned entities and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. All other trademarks mentioned are the property of their respective registrants. MANAGED SERVER® is a European registered trademark of MANAGED SERVER SRL, with registered office in Via Flavio Gioia, 6, 62012 Civitanova Marche (MC), Italy and operational headquarters in Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Have you ever wondered if your hosting sucks?

Find out now if your hosting provider is hurting you with a slow website worthy of 1990! Instant results.

Close the CTA
Back to top