Skip to main content

Key takeaways from addressing the PHP2shell vulnerability

Key takeaways from addressing the PHP2shell vulnerability

Key takeaways from addressing the PHP2shell vulnerability

CMS —

Jump to content
Aurora working at a desk in the Numiko office

What we learned from quickly addressing a major cyber threat. 

The PHP vulnerability

On Wednesday 21 October, a critical flaw in PHP went from pre-announcement to active exploitation in a matter of hours. Exploit details leaked before the fix landed, the NCSC issued an alert, and it made the BBC News front page.

PHP2shell let an attacker run code on a site without logging in. For anyone looking after public-facing websites, that's about as bad as it gets.

The two flaws both scored 9.2 out of 10 on severity, and they reach back to PHP 5.4, so the hole had been sitting there for about 14 years. Around 70% of the web was affected. Researchers at Calif and at Wiz found them separately in August, both using frontier AI models. The fix was then prepared quietly under embargo for two months, which is why security firms and cloud providers had protections ready. Disclosure was set for 22 October, but proof-of-concept code leaked on social media on the 20th, so PHP brought its release forward a day.

At Numiko the vast majority of our sites use Drupal, which, like most of the web, is built on PHP. We're well versed in rolling out urgent patches to our clients, many of which provide critical services and high-profile, high-visibility web properties. The timing of this one really exercised our muscles. 

We’re proud of how we performed and kept our clients' site safe, but the response also taught us valuable lessons for how to handle these issues. These are certain to come in useful soon, as we’re forced to deal with an ever-increasing cadence of major cyber threats. 

Our response

We picked up the pre-announcement at 8:20 and made sure we'd prepped all sites to be ready for update. By lunchtime our clients knew what was coming. When the full announcement dropped at 14:00, the whole world officially got the fixed PHP releases, and the full details of how to exploit.

Our CDN and security provider Cloudflare could instantly protect our sites and prevent attacks getting through. Their rules went live at 03:02 that morning, eleven hours ahead of the patch, across every plan. Our hosting provider Upsun, formerly Platform.sh, built their own layers of protection, while they were working through the huge task of patching multiple versions of PHP across dozens of regions.

Keeping on top of the mitigations was a bit like whack-a-mole. Attack vectors were continually mutating, and Cloudflare was openly tracking payloads changing shape to get past its rules. Those protections sat in front of every site, but only the patched version of PHP was a full fix, and that would take time to reach every server.

So we ran the day as a war room: one call, one channel, named roles, and a live list of every site. We assessed each site's risk and, with each client's agreement, took 13 sites offline behind a holding page. The holding page made clear the site hadn't been compromised. The rest stayed up behind the firewall while we watched the traffic closely.

Once we were completely confident the protections were solid, we brought all the sites we'd taken offline back up by around 8pm. Every site was back online that night with no signs of compromise, and PHP was fully patched later in the evening.

Our key takeaways

01

Taking a site down is a legitimate security decision

The NCSC's advice was blunt: update, or take the site offline. It's an uncomfortable conversation to have, but worth having. Plenty of organisations did the same thing that day. Ministers told the House of Lords that 32 UK government services were unavailable and four partially down. Council sites in Edinburgh and Oxford went offline, along with the Met Police's, and so did government sites in Germany, France, Belgium, Finland and the Netherlands.

 

Our clients told us they'd rather be prudent alongside their peers than exposed. We had all clients' sites back up and running within a few hours, so the downtime didn't create major headaches for the organisations that chose to switch temporarily to a holding page out of an abundance of caution.

02

You can only patch what's still supported

PHP 8.1 and every older branch got no official fix on 21 October. The branch reached end of life last December, and PHP's security team published only minimal source backports for teams building from source. Every site we manage was on a supported version, so every one of them could be patched. Across the internet it's a different picture: Qualys put 110 million PHP installations, around 71% of them, on end-of-life versions from 5.4 to 8.1, and most will never get a vendor patch.

 

Sometimes the patch isn't yours to apply either. On 21 October, it was our hosting provider's (Upsun). 

03

Comms is more than half the job

Clients cared as much about hearing from us regularly as about the technical fix. An update saying nothing has changed is still worth sending.

 

It ran the other way too. Good, human comms with our service providers was the spine of the decision-making throughout the session. Knowing what Cloudflare had shipped, and what Upsun was patching and in what order, is what let us decide which sites to take offline and when to bring them back.

04

This will keep happening

The frequency and severity of security issues is only going to accelerate. The flaws behind PHP2shell sat in the language for 14 years. Now AI is exposing these, and it will keep finding them. 

 

What's changed is the cost of building a working exploit chain. Frontier models like Argon, Astra and Mythos will be generating chain exploits like PHP2shell with alacrity. Keeping your code closed is no protection, because the same tools find vulnerabilities in closed software just as well.

 

Open source handles this better than it gets credit for. Drupal has a dedicated security team that fixes vulnerabilities in private, then publishes the fix and the warning together, so by the time a problem is public the fix already exists. Drupal now funds paid security engineers alongside its volunteer team.

 

We're changing our security posture to deal with the likely incoming vulnerability crisis. We're working with our clients on security hardening over the coming weeks, and we talked it through with the sector at our Great Digital for Good conference earlier this month.

If you’ve got questions about how to secure your site, do get in touch via [email protected].

Developing looking at code on a monitor and laptop

Website support and optimisation

Keep your website stable, fast, and secure with our website support and optimisation service.