PHP2Shell: Keep a Cool Head, but Patch Now

Automated English translation of the original Spanish article. Code examples keep their original identifiers.

What Happened

On October 21, 2026, the PHP project published emergency patches for two critical vulnerabilities in the language core, collectively known as PHP2Shell: CVE-2026-109618 and CVE-2026-109619. Both carry a CVSS v4.0 score of 9.2 and allow remote code execution, without authentication, under the permissions of the user running the web server.

Details were leaked a day ahead of the scheduled disclosure, alongside a 10.0 score that the PHP Foundation later clarified was inaccurate. That leak explains part of the panic: the alarm bells rang before the explanation arrived.

Two Distinct Flaws, Not One

Although people refer to “the vulnerability” in the singular, these are two separate flaws with different root causes:

  • CVE-2026-109618, out-of-memory (OOM) corruption. If PHP runs out of memory right while preparing request data, that data is left half-initialized, and subsequent cleanup routines treat it as valid.
  • CVE-2026-109619, stale global state. A worker can retain information from a request after freeing the memory backing it, and the next request handled by that same worker ends up using it. This flaw is also associated with memory leaks (e.g., passwords, tokens, or API keys from other requests).

A detail explaining why this is so critical: both trigger while PHP is parsing the request, before your application code ever executes. That is why running WordPress, an e-commerce shop, or a custom admin panel makes no difference to your exposure: what matters is the PHP version.

Who Is Affected and Who Isn’t

The risk lies in web servers running PHP: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. That is where WordPress, Drupal, Joomla, or Magento sites reside, among others.

If you do not manage any servers, your PC and phone do not require any changes, and there is nothing to delete or uninstall. The same applies if you only have PHP installed locally for coding or command-line scripts, without an exposed web server.

That said, “it does not affect me directly” is not the same as “it affects no one.” If a site you use remains unpatched, an attacker targets that server, and one of the vulnerabilities can leak data across requests. Your device is safe; what might be exposed are your accounts on that site.

If You Manage Servers: Update

The only complete solution is updating PHP, as the project itself states in both advisories. These are the patched versions:

PHP BranchStatusPatched Version
8.5Active support8.5.12
8.4Active support8.4.27
8.3Security fixes only8.3.36
8.2Security fixes only8.2.35
8.1 and earlierEnd of lifeNo official patch from the PHP project

If you are running 8.1 or earlier, the PHP project will not release a fix. You must migrate or look for backports from your Linux distribution or extended support provider; AlmaLinux, for instance, has already published patched packages across all its streams. Also make sure to verify the actual PHP version serving your web traffic, which does not always match what the CLI displays.

If you cannot update right away, there is a partial mitigation: disable session upload progress.

session.upload_progress.enabled = 0

Set this in php.ini or within your web server / pool configuration (not via ini_set() or .user.ini, as it must take effect before request processing begins) and restart your workers. On PHP 8.5, setting fatal_error_backtraces=0 is also advised.

What this mitigation does not do: it blocks confirmed session-based exploitation paths, but not other potential vectors. Adjusting memory_limit is not a fix either. Filtering anomalous multipart requests at your WAF or Nginx layer helps detect and reduce attacks, but it is no replacement for patching.

If You’re Just a User: Two Habits Are Enough

You do not need to update anything on your personal devices because of this alert. What is worth doing—and not just because of PHP2Shell—is guarding yourself against the possibility of a site you rely on being compromised:

  • Use unique passwords across every service, so a leak in one does not compromise the others.
  • Enable two-factor authentication wherever possible.

If you manage or know someone who owns a website (an online shop, a WordPress blog), it is worth letting them know to check their PHP version or reach out to their hosting provider.

My Take: Neither Panic nor Downplay

When I first read the news, I was alarmed, like most people. Then I followed my own usual advice: check the original sources, understand who is actually impacted, and deploy the available fixes across my servers. That sequence—read, understand, act—is far more useful than either panic or apathy.

That leaves me with two takeaways.

First, calm must be informed. Telling someone “you’re not affected” is good news only when accompanied by why: the issue resides on web servers, not on your PC or phone. Unexplained reassurance looks a lot like indifference, and indifference is what leaves servers unpatched for months on end.

Second, “keeping a cool head” means acting systematically, not adopting a wait-and-see attitude. The warning here was not an overreaction for server administrators: it is a critical vulnerability, patched under emergency procedures, with active exploitation attempts already observed by security firms. What was uncalled for was the sensationalist “end of the internet” rhetoric. Between those two extremes lies a sensible path: determine whether you are vulnerable, patch, and if you cannot patch immediately, mitigate while preparing to upgrade, fully aware that mitigations are only partial.

And a broader lesson for the next alert: before sharing or reacting, ask who is truly exposed, what the primary source says, and what the concrete action item is. Those three questions filter out almost all the noise without missing what actually matters.

Keep sysadmining.

Sources

Retrieved on October 22, 2026: