Articles & BlogBy 9 min read

For anyone who runs a website, pays someone to run one, or wants to follow the news with some confidence. By the end you will know what PHP2Shell is, whether it touches you, and what to do about it.

In late October 2026 a pair of security flaws picked up a catchy name, PHP2Shell, and a lot of site owners had a bad week. The flaws are not in WordPress or in any single website. They are in PHP itself, the software that sits underneath a very large share of the web.

This article walks through what happened, with each date and figure credited to the source that reported it.

A technician in a red plaid shirt crouches on a raised white floor with an open laptop, working on the cabling at the back of a tall black server rackEvery PHP site lives on a server somebody has to keep patched. Photo by Derrick Coetzee, CC0, via Wikimedia Commons.

What is PHP, and why is it everywhere?

PHP is a programming language built for making web pages on the server. When you open a page on a PHP site, your browser does not receive a file that was sitting there ready. A program runs first. It looks things up in a database, assembles the page, and sends back the result. PHP is the engine that runs that program.

PHP is free, it has been around for decades, and nearly every hosting company offers it. WordPress, Drupal and Joomla are all written in it. W3Techs, as cited by Wikipedia, puts PHP at 69.2% of websites whose server-side language is known. That number is market share. It is not a count of sites that can be attacked.

A diagram of a page request. The visitor's browser sends a request to the web server, such as Apache or nginx. The web server hands the request to PHP, which runs the site's code and reads the site's files and its database. The finished page then travels back through the web server to the visitor. A red label marks PHP as the place where the flaws are.PHP takes input from any stranger on the internet and can reach the site's files and database.

Look at where PHP sits. It handles input from anyone who can reach the site, and it can read the site's files and talk to its database. A flaw in one plugin puts the sites that use that plugin at risk. A flaw in PHP puts every application built on it in question.

What are the two flaws?

PHP published two entries. A CVE number is the public ID given to a known flaw.

CVE numberPHP's name for itIn plain terms
CVE-2026-109618"RCE via OOM corruption"An out-of-memory error interrupts PHP while it is still setting up a request's data, and the cleanup code then treats the half-built data as valid
CVE-2026-109619"RCE via stale global state"State that belonged to one request survives after its memory has been freed, and a later request on the same worker process uses it

Both are mistakes in how PHP keeps track of memory. Qualys calls the second one a use-after-free, which means a program keeps using a piece of memory after handing it back.

The headlines called them "unauthenticated remote code execution." Here is that phrase taken apart.

TermMeaning
RemoteThe attacker does not need to be near the server. An internet connection is enough.
Code executionThe attacker gets the server to run commands of the attacker's choosing
UnauthenticatedNo username, password or account is needed
ShellA program that takes typed commands and runs them. Akamai reads the name PHP2Shell as getting from PHP to a shell.

Both flaws also need no action from a user. Nobody has to click a link. Both are scored 9.2 on version 4.0 of the Common Vulnerability Scoring System (CVSS), which falls in the critical band of 9.0 to 10.0.

The score comes with a caution in the reader's favor. It rates attack complexity as high, and Qualys writes that "Exploitability varies by configuration and application behavior". So not every PHP server is equally easy to hit. Arctic Wolf adds the other side: exposure does not necessarily depend on a flaw in the application. One path runs through PHP's upload progress feature, which Akamai notes is on by default. Qualys also reports that researchers showed they could read a PHP worker's memory without logging in, which can expose passwords, tokens and API keys.

What happened, and when?

A vertical timeline. August 2026: researchers at Wiz and Calif find the flaws, reported to PHP on 24 August according to Recorded Future. 20 October: PHP gives advance notice of a security release set for 21 October at 14:00 UTC. 21 October, 02:29 UTC: a leaked archive of the details appears on VirusTotal, according to Recorded Future. 21 October: PHP releases fixed versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Within hours: attack attempts are seen, and at least one report dates an attempt before the release. 23 October: a follow-up advisory says to keep upload progress switched off until the next release. 26 October: CISA adds both flaws to its Known Exploited Vulnerabilities catalog, with a 29 October deadline for federal agencies. 31 December: PHP 8.2 reaches end of life.From discovery in August to the fix on 21 October, and what came after.

Researchers at Wiz and Calif found the flaws in August 2026. PHP gave a day's notice of the fix, the details leaked overnight, and the fixed versions came out on 21 October. Attack attempts were seen within hours of the release, and at least one report dates an attempt before it.

What did the attackers do? Arctic Wolf saw widescale scanning. The scanners checked for upload progress behavior and tested whether they could run operating system commands. Some requests tried to download a payload that Arctic Wolf links to Potassium, a botnet family derived from Mirai that can run DDoS attacks, which flood a target with traffic until it stops answering. Arctic Wolf says its data did not establish that those downloads ran.

CISA, the US federal cybersecurity agency, published an alert on 21 October. On 26 October 2026 it added both flaws to its Known Exploited Vulnerabilities catalog, its list of flaws confirmed to be under attack, with a due date of 29 October 2026 for US federal agencies.

Recorded Future says the full extent of successful exploitation is not established, and watchTowr notes that no attacker has been publicly named. Wikipedia reports that Wikimedia shut down services as a precaution.

Who is exposed, and why did old versions make it worse?

Anything built on PHP is in scope: WordPress, Drupal and Joomla sites, hosting control panels such as cPanel and Plesk, and appliances and applications that bundle their own copy of PHP. The affected ways of running PHP on a web server, as PHP lists them, are PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP rates mod_php highest.

PHP is released in branches, such as 8.3 and 8.4. Each branch gets fixes for a few years and then reaches end of life, after which the project stops updating it.

BranchWhat PHP provided
8.5, 8.4, 8.3, 8.2Fixed releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Every earlier release of each branch is affected.
8.1, 8.0, 7.4No longer updated. Minimal source patches only, with no official builds.
7.3 and olderNo fix, according to watchTowr, which also says PHP 5 is confirmed affected

Qualys, counting PHP installations among its own customers in figures updated 29 October 2026, saw 156 million with a known version. Of those, 110 million (71%) ran end-of-life branches and 44 million (28%) ran 8.2 to 8.5. Only 199,000 were patched in the first 12 hours. None of these numbers counts servers confirmed to be vulnerable, but they show how many had no simple update to install.

PHP installations Qualys saw among its customers, by branch status, in millions
PHP installations Qualys saw among its customers, by branch status, in millions
End-of-life branches110
Supported branches (8.2 to 8.5)44

Source: Qualys, from its own customers, updated 29 October 2026

A site on a supported branch had a one-step answer on 21 October. A site on an end-of-life branch had to patch source code by hand, jump several versions at once, or go without. PHP 8.2 itself reaches end of life on 31 December 2026.

What should you do?

Start with the version your server runs.

php -v

This prints the version of PHP installed on the machine.

PHP 8.3.36 (cli) (built: Oct 21 2026 09:14:02) (NTS)

On shared hosting you will not have a command line. Look for a PHP version setting in your hosting control panel instead.

Tip

A Linux distribution may ship the fix while keeping its old version number, so the version string alone does not prove a server is patched or unpatched. Search your distribution's security advisories for CVE-2026-109618 and CVE-2026-109619.

If you are on 8.2 to 8.5, update to the fixed release for your branch. If you are on anything older, plan the move to a supported branch now. PHP's own words are blunt: "There are no complete mitigations, updating is the only safe choice."

If you cannot update at once, PHP says to change these settings in php.ini, the FPM pool or the server configuration.

session.upload_progress.enabled=0
post_max_size=8M
upload_max_filesize=2M

The first line turns off the upload progress feature. The other two cap the size of incoming requests: PHP suggests 8M for post_max_size where the site takes no uploads, or 32M where it does, with upload_max_filesize below it and the same limits enforced at the web server. On 8.5, PHP also says to set fatal_error_backtraces=0. Do not rely on ini_set() or a .user.ini file for any of this, and do not expect hiding error messages to help. PHP's follow-up advisory of 23 October said to keep upload progress off until the next release.

If someone else runs the site for you, ask three questions. Which PHP branch is my site on? On what date were the fixes for these two CVE numbers applied? Is that branch still supported?

Watch out

Do not go looking for PHP2Shell "test" tools or exploit code. Qualys warns of look-alike exploit code that is itself malicious. Check only servers you own or have written permission to test. Probing someone else's site without permission is a crime in most places, including under the US Computer Fraud and Abuse Act.

Then look backward. Recorded Future advises reviewing logs from 20 October onward, and warns that "Logs may show little". Aikido, Arctic Wolf and Recorded Future list these signs:

  • Upload-style requests carrying a PHP_SESSION_UPLOAD_PROGRESS field, followed by memory-limit errors or runs of HTTP 500 errors.
  • New or changed PHP files, and files in upload folders that should not be there.
  • New admin users nobody created.
  • The web server starting programs it never starts, such as a shell, wget or curl, or making unexpected outbound connections.

If you suspect a compromise, change every password, key and token the server held.

What to remember

  • PHP2Shell is two flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, both scored 9.2 on CVSS 4.0.
  • They need no login and no user action, though the score rates the attack as complex and results vary by setup.
  • The fixed versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released 21 October 2026.
  • CISA added both flaws to its Known Exploited Vulnerabilities catalog on 26 October 2026, with a 29 October deadline for federal agencies.
  • Branches 8.1 and older got source patches at best. End-of-life software turned a routine update into a project.
  • Updating is the fix. Turning off upload progress and capping request sizes buys time only.
  • Check your distribution's advisory for the CVE numbers, because the version string can mislead.

PHP2Shell will not be the last advisory with a critical score and a catchy name. "How to Read a Security Advisory Without Panicking" uses this same advisory to show how to read the next one, including how to look a flaw up in CISA's catalog yourself. After that, "Web Shells and Remote Code Execution: How a Website Gets Taken Over" covers what an attacker does with a server once commands will run on it.