Skip to content

Critical PHP vulnerability: immediate security checks.

Two severe flaws in PHP allow an attacker to run code on the server remotely, without logging in. A summary of the problem, who is affected, and what to do now.

Published: 22 October 2026

In short

Vulnerabilities
CVE-2026-109618 and CVE-2026-109619, together known as PHP2Shell
Severity
Critical, 9.2 on CVSS v4.0
Impact
Remote code execution without authentication
Affected
Every PHP installation serving web requests before the fixed releases, back to PHP 5.4
Fixed versions
8.5.12 · 8.4.27 · 8.3.36 · 8.2.35
Attacks
Exploitation attempts since 17 October 2026

What happened?

On 21 October 2026 the PHP project released an emergency security update for two critical flaws. Both allow an attacker to run their own code on the server remotely, without logging in. Together the two flaws are known as PHP2Shell.

The Hungarian National Cyber Security Institute (NBSZ NKI) issued an alert the same day, urging an immediate update and, where that is not possible, isolating or temporarily shutting down affected internet-facing systems. As a precaution, the Hungarian government temporarily took the magyarorszag.hu portal and several other government sites offline. No signs of an attack were found there.

What is the flaw?

Both flaws sit in PHP’s memory handling, in the runtime itself, not in the website’s own code.

  • CVE-2026-109618: if a request runs out of the memory PHP allows (memory_limit) at the wrong moment, processing can stop while the request’s internal data is only partly initialised. Cleanup may then treat that data as valid, which can corrupt memory and lead to code execution. Under Apache mod_php a single unauthenticated request can trigger it before any application code runs.
  • CVE-2026-109619: after a fatal error, a request’s internal state can point to memory that has already been freed, and a later request on the same PHP worker can use it (use-after-free). This can leak memory contents and lead to code execution.

PHP rates both flaws 9.2 on CVSS v4.0, which is critical. The 10.0 score that circulated before disclosure is incorrect.

Who is affected?

Every PHP installation that serves web requests: PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers mod_php the highest risk. The affected code has been present since PHP 5.4.

That makes every system built on PHP affected too: WordPress and WooCommerce sites, Drupal, Joomla and Magento, Laravel and Symfony applications, and custom PHP software. Updating WordPress or its plugins does not fix the flaw, because it is in PHP. On shared hosting the PHP version comes from the hosting provider and can be checked in the control panel or with the provider.

PHP branches and fixes
PHP branchFix
8.5Fixed in 8.5.12
8.4Fixed in 8.4.27
8.3Fixed in 8.3.36
8.2Fixed in 8.2.35, support ends on 31 December 2026
8.1, 8.0, 7.4No official release: minimal source backports, or a Linux distribution or LTS vendor package
7.3 and olderNo fix, an upgrade to a supported version is needed

What are the risks?

Remote code execution is one of the most severe classes of flaw: with the web server’s permissions, an attacker can do anything the website itself can.

  • Data theft: customer data, orders, passwords and API keys can end up in the wrong hands.
  • For web shops, silent changes to the payment page and theft of the card details entered there.
  • Malicious code and redirects: visitors can be sent to infected pages, and browsers and Google can flag the site with a warning.
  • Ransomware and downtime: earlier critical PHP flaws (such as CVE-2024-4577) have been exploited in ransomware campaigns.
  • The server as a stepping stone: a compromised machine can be used to attack internal systems, send spam or mine cryptocurrency.
  • Legal consequences: under the GDPR, a personal data breach must as a rule be reported to the supervisory authority within 72 hours.

Attacks have already started. Amazon’s threat intelligence saw an exploitation attempt on 17 October 2026, four days before disclosure, and Cloudflare and watchTowr have since reported attack attempts. Besides updating, it is worth checking whether a compromise has already happened.

What to do now?

  1. Check the PHP version

    The php -v command on the server, the hosting control panel or the provider gives the version. The PHP used by the web server can differ from the command line one, so the web version is worth checking too, for example with a temporary phpinfo() page that is deleted afterwards.

  2. Update to a fixed version

    8.5.12, 8.4.27, 8.3.36 or 8.2.35, or the fixed package of the Linux distribution. Restart every PHP worker after the update; for containers, update the base image as well.

  3. Plan an upgrade for old versions

    PHP 8.1 and older branches get no official fix. The answer is a distribution or LTS vendor fix, or an upgrade to a supported version with a compatibility check of the application.

  4. Look for signs of compromise

    Review the logs from 17 October: repeated HTTP 500 errors, PHP-FPM crashes (SIGSEGV), commands started by the web server user, unknown files in /tmp and unusual outbound connections.

Temporary protection if the update is delayed

According to PHP and NBSZ NKI, the settings below reduce the risk but do not make a system safe. Only the update is a complete fix.

  • memory_limit = -1 set so applications cannot override it (for example php_admin_value), a low post_max_size with upload_max_filesize below it, and a container or cgroup memory limit to protect the server.
  • session.upload_progress.enabled = 0, on PHP 8.5 also fatal_error_backtraces = 0, then a restart of every PHP worker.
  • Request size limits on the web server or proxy, and WAF rules (for example Cloudflare). These add protection, but the providers themselves call them temporary.
  • If none of this is possible: isolate or temporarily shut down the affected internet-facing system, as NBSZ NKI recommends.

Immediate security check by Dehotech engineers.

Checking and fixing affected systems starts right away: on shared hosting, on own servers and in the cloud alike.

  1. Assessment

    A check of the PHP version, the server API (mod_php, PHP-FPM, CGI) and the configuration on every affected server and hosting account.

  2. Fix

    An update to a fixed version, or temporary protection when the update cannot be done right away. An upgrade plan for old PHP versions.

  3. Investigation

    A review of the logs and the file system from 17 October for signs of compromise.

  4. Handover

    A functional test after the update and a short written summary of the steps taken and what comes next.

Frequently asked about PHP2Shell.

Short answers to the most common questions.

No. The flaw is in PHP itself, so PHP has to be updated to a fixed version. Keeping WordPress and its plugins current still matters on its own.

Check now, not after an attack.

After a short call, Dehotech engineers start the check right away.

Contact