A hand holding up a sticker of the PHP elephant.
Photo: RealToughCandy.com

News and insights

PHP2Shell: what happened, and how to track your response

On 21 October the PHP project released emergency fixes for two critical vulnerabilities, known together as PHP2Shell: CVE-2026-109618 and CVE-2026-109619. Both let an attacker who isn’t signed in run their own code on a web server that runs PHP. Each is scored 9.2 out of 10 for severity.

What happened

PHP runs a large share of the web, including WordPress, Drupal, Magento and countless in-house sites and portals. The two flaws are in PHP itself, not in any one application, so almost any PHP server that handles web requests is affected. That includes PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Servers using mod_php are the most exposed: a single request can trigger the attack before the website’s own code even runs.

The flaws were due to be disclosed in a planned way, with fixes ready. But details reached attackers early. Amazon recorded an attempt to exploit them on 17 October, four days before the fixes were published, and further attempts were reported once the fixes were out.

What to do now

  • Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your Linux distribution’s patched package.
  • Older versions: PHP 8.1 and earlier are no longer supported. Source fixes exist for 7.4, 8.0 and 8.1, but the safer course is to upgrade.
  • Systems you can’t fix straight away: the UK’s National Cyber Security Centre advises taking them offline.
  • Check what you don’t run yourself. Hosted websites, customer portals, plugins and the products your suppliers provide may run PHP without you knowing. Some security appliances are affected too, and their vendors are still releasing fixes.

Keeping a record of your response

The patching is the urgent part. The questions come afterwards, from your board, your auditors, your customers or a regulator: did it affect us, what did we do, and how quickly? An information security risk register is where those answers live. This is how a response looks in RiskWitness.

Find what’s exposed. Search your asset register for systems that run PHP: websites, portals and the servers behind them. Each asset shows its owner, and the risks and suppliers linked to it.

Record the risk. Add a risk such as “A public web server is taken over through an unpatched PHP flaw”, scored before and after your controls. Link the assets it applies to and the controls that reduce it, such as patch management or a web application firewall.

Give the fixes owners and dates. Add an action for each system to be patched or taken offline, each with an owner and a due date. Overdue actions show on the dashboard until they’re done.

Ask your suppliers. For suppliers that host or build things for you, record what you asked them and what they said. Keep their confirmation on their record, so the evidence is where you’ll look for it later.

Decide what you can’t fix yet. If a system can’t be patched or switched off, record that decision as a risk acceptance. It’s recorded with a reason and lasts for a set period, then comes back for review. If it’s outside your tolerance, a named approver has to sign it off.

If you were hit, record the incident. Log it with who’s handling it, link it to the risk and the affected assets, and see which regulators you may need to tell and by when.

Every one of these steps lands in the risk’s history, with who did what and when. That history can’t be edited or deleted afterwards. When someone asks how you handled PHP2Shell, you can show them the record rather than piece it together from memory and email.

Is RiskWitness affected?

No. RiskWitness doesn’t use PHP anywhere: not in the application, its web server or the services it runs on.

Sources