Skip to content

Craft CMS and PHP2Shell - how we dealt with it

Andrew Fairlie
2 min read

On 21st October we became aware of an vulnerability in PHP, dubbed PHP2Shell.

PHP is a server-side programming language that powers about 70% of the web, including all WordPress, Craft CMS, Drupal, TYPO-3, Laravel and other popular CMS’ and frameworks.

We took immediate action on three fronts:

  • For our clients who use Craft Cloud, we spoke to the Craft team to understand the mitigations they’re putting in place and notified affected clients, also informing them that there’s a route to take the sites offline if they wish.
  • For our clients that use Servd, we spoke to them to learn the procedures and out of an abundance of caution we put all sites and environments on Servd’s maintenance mode which stops access to PHP entirely.
  • For our clients that use a VPS, we added a firewall rule so that only the VPS providers and Mutual can access the servers, effectively turning off the site for public access.

Taking sites offline is never a nice route to take but this vulnerability is particularly potent, and a short period of downtime while mitigations and patches land is far better than a long outage and clean-up after an attack. It also matched the UK Government’s official advice, as well as guidance from security agencies and experts around the world.

At around 15:00 (UK time) the patched PHP release went live. As each hosting vendor tested and released their own patches, we carried out any manual steps they asked for and brought sites back online. All supported sites were patched and back online by about 20:55.

Huge thanks to the Craft CMS, Craft Cloud, Servd, Cloudflare and PHP teams, and to my colleagues at Mutual, who handled a stressful day superbly and pulled together to help keep our clients and the web at large safe.

Stay safe.

Andrew Fairlie
Andrew Fairlie
Technical Director · 13+ years with Craft CMS

Andrew is Technical Director at Mutual, a Craft CMS Partner agency. He has been building with Craft CMS since its public beta in 2012 — working through every major version from Craft 1 to Craft 5 — and has delivered over 100 sites for clients including Apple, Transparency International, and Arts University Bournemouth.

He writes about Craft CMS on the Mutual blog and has contributed to net Magazine. At Mutual, he leads development of Mutual One, a marketing platform built on Craft CMS as its foundation.

He has spoken about Craft CMS to undergraduate students at the University of Brighton and Canterbury Christ Church University, and appeared on the Devmode.fm podcast. He has also trained other developers on working with the platform.

More from the blog

Let's get your site
where it should be

Tell us a bit about your site and what it needs to do. We'll reply within a working day, and you'll be talking to the people who'd do the work.