PHP High-Risk Vulnerability php2shell: An Emergency Fix Checklist for SME Websites

2026-10-23 03:15:32

On October 21, China's National Vulnerability Database (CNVD) catalogued two severe PHP security vulnerabilities, designated CVE-2026-109618 and CVE-2026-109619, codenamed "php2shell" in the industry. Both carry a CVSS v4.0 score of 9.2, with CNVD's overall rating of "high risk".

This is not another routine "remember to update" reminder. It breaks PHP interpreter kernel memory management — the layer most websites run on at the bottom of the stack. Fixing it requires touching the PHP itself on the server; no application-layer action substitutes.

PHP High-Risk Vulnerability php2shell: An Emergency Fix Checklist for SME Websites

1. The Harm Chain: One Request, the Whole Server

Per official and multiple security teams' descriptions, the attack path is remarkably short: an unauthenticated remote attacker crafts a special multipart POST request to the target server, triggering memory corruption and ultimately achieving remote code execution — control of the server. Beyond RCE, the same vulnerabilities enable denial-of-service attacks and theft of sensitive data.

The timeline carries an episode: vulnerability details leaked early on October 20, forcing the PHP security team to confirm and announce the release date — and attackers began exploiting hours before the patch went live. The official fixed versions were not published until 13:30 UTC on October 21.

In other words, between the leak and the patch there was a window — and the attacks had already started before it closed.

2. Affected Scope: First Check Whether You Are in the Frame

Affected PHP versions are as follows:

BranchAffected versionsFixed version
8.5.xBelow 8.5.128.5.12
8.4.xBelow 8.4.278.4.27
8.3.xBelow 8.3.368.3.36
8.2.xBelow 8.2.358.2.35
8.1 and earlierAll (official support ended)Upgrade or rely on LTS vendor patches

On deployment forms, what is affected is not "websites written in PHP" but every environment handling web requests with PHP: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, LiteSpeed. Apache mod_php was named by the official advisory as the highest-risk configuration — attackers can trigger the exploit before any application code runs, with a single unauthenticated request.

Collateral impact covers mainstream CMSes and frameworks including Magento, WordPress, Drupal, Joomla, MediaWiki, Roundcube, phpMyAdmin, Nextcloud, Laravel, Symfony, WHMCS, and OpenCart. The claim of "impacting seventy percent of the world's websites" does not mean seventy percent of sites will be breached — it means the underlying runtime shares one risk surface.

3. Where Each of the Two Vulnerabilities Breaks

The mechanism descriptions from the official advisory and CERT compress into two sentences.

CVE-2026-109618: the scene is not cleaned up after an error. PHP uses longjmp() to abort requests exceeding memory_limit and raise an OOM error. This interrupts while internal request data is only half-initialized — for example, mid-parse of a form file upload. The subsequent cleanup frees that invalid data as if valid — and that memory may still hold attacker-controlled leftovers.

CVE-2026-109619: the previous request's state survives into the next. Request-held internal state remains alive after its backing memory is freed — for example, after a fatal error. The next request processed by the same worker may use that stale state before normal initialization resets it.

In sum: PHP does not thoroughly "clean the scene after errors", and attackers can position the error point where it benefits them.

4. What to Do Now (In This Order)

Step one, check versions — note the CLI and what the website actually runs are not the same thing.

Use php -v for the CLI version and php-fpm -v or php-fpm8.3 -v (per your branch) for the version the website actually runs. The most common trap: the CLI shows 8.3.36 already, while the site actually runs 8.3.20 in the FPM pool — the two simply out of sync. After upgrading, re-verify the same way via FPM.

Step two, upgrade if you can.

Prefer official packages from your distribution or LTS vendor — do not self-compile. For EOL 8.1 and earlier: ask suppliers whether backported patches exist; PHP officially also provided minimized source backports for 7.4, 8.0, and 8.1 for organizations building from source.

Step three, if the patch cannot be applied, block first.

  • CVE-2026-109618: set memory_limit=-1 in the FPM pool or Apache configuration (using php_admin_value, so the application layer cannot override it), and confirm no other layer resets it to a finite value
  • CVE-2026-109619: isolate internet-facing PHP applications from the public network until the patch is applied and verified
  • Official interim measures also include: temporary takedown, disabling session upload progress, and network access restrictions

To be clear: the official advisory states explicitly that **only upgrading is the real fix** — these measures merely reduce exposure on specific attack paths and do not equal safety.

Step four, after upgrading you must verify. Restart php-fpm or apache and check the version again. "Upgraded but not restarted" fake fixes appear absurdly often in incident reviews.

Step five, look back for whether you were touched. Vulnerability details and proof-of-concept code are already public — the attack threshold is low. Beyond the patch, three more things: rotate server credentials (accounts, passwords, keys); scan logs for abnormal multipart POSTs and abnormal child processes; sweep for webshells.

5. A Common Misconception: Updating WordPress Does Not Help

WordPress has stated explicitly: this issue **cannot be resolved through application-layer updates** — site owners must update the PHP environment actually running on the server directly.

Many people's first reaction to the news is logging into the admin panel to update WordPress and plugins — the wrong direction. What must be touched is the PHP itself on the server. SME sites are mostly hosted on virtual hosts or third-party servers, with the PHP version not in their own hands — in that case what to do is: contact the hosting provider immediately to confirm whether they have patched; if they cannot, demand a concrete isolation or interim protection plan with a timeline.

« Back to News list