PHP2Shell: how we have protected our clients’ websites

PHP2Shell: hur vi skyddat våra kunders webbplatser - Dalarna Digital

This week universities, government agencies and municipalities in large parts of the world took down their websites. The cause was a serious flaw in PHP, the technology that runs most websites, WordPress included. Here is the situation today, what we have done and what it means for you.

What has happened

On 21 October the PHP project released urgent security updates for two critical vulnerabilities that have been named PHP2Shell. The flaws have a severity of 9.2 out of 10. They make it possible for an attacker to run their own code on a web server without logging in.

What makes PHP2Shell unusual is where the flaw sits. It is not in the website, but in the server underneath it. That is why it doesn’t matter how well maintained a WordPress site is. The only thing that protects it is that the server runs an updated version of PHP.

The attack attempts came quickly. According to Cloudflare they rose from tens of thousands in the first 45 minutes to millions within a day. Security companies have confirmed that the flaws are being actively exploited.

The situation in Sweden and around the world

  • Sweden: CERT-SE and the National Cyber Security Centre urge all organisations to update promptly and check their systems. KTH, Karolinska Institutet and Uppsala University shut down services as a precaution. The NCSC has so far not reported that the flaws have been exploited in Sweden.
  • The Nordics: In Norway the login service Feide was temporarily shut down. In Denmark the school platform Aula was among those affected, and in Finland the government’s public web services were shut down during the update.
  • Europe: Germany’s BSI has raised the warning to level 3 of 4. In the Netherlands DigiD and the parliament’s website were among those taken down.
  • Rest of the world: Wikipedia switched off features during the update. Authorities and companies in Japan, China and South Korea have also taken websites offline.

Most shutdowns have been precautionary. The organisations have closed to buy time, not because they have been hacked.

What we have done together with Oderland

Our clients’ websites are hosted at Oderland, a Swedish hosting provider with its own operations. We have followed their work closely since the flaws became known.

  • 21 October, morning: Oderland activated new protection rules on all servers that block known attack attempts, and switched off the PHP feature that one of the flaws exploits.
  • 22 October, 04.05: Oderland confirmed that all PHP versions on their web hosting, Agency and Managed Server were updated and protected.

The servers were in other words patched less than a day after the update was released, and protection rules were in place even before that. On top of that we do our own work, site by site:

  • Version check: We check which PHP version each website runs and verify it against Oderland’s information.
  • Intrusion check: We go through administrator accounts, files and logs from 17 October onwards, the day the first attack attempts were observed.
  • Upgrade: Websites that have run older PHP versions are moved to a version with full security support.
  • Ongoing monitoring: We follow CERT-SE, Oderland and the PHP project and act immediately if the situation changes.

What it means for you

If your website is managed by us, you don’t need to do anything. The server is updated and we are going through your site. Should we find anything, we will contact you personally.

Frequently asked questions

Do I need to update WordPress or my plugins?
No, not for this flaw. The flaw sits in PHP on the server, not in WordPress. The WordPress security team has confirmed that no WordPress update is needed.

My site shows PHP 8.2.34, not 8.2.35. Is it protected?
Yes. Oderland’s operations provider has built the fix into existing versions, so the version number may differ from the official one even though the protection is in place.

Have any of your clients been affected?
We have seen nothing to suggest so. The review is our way of knowing, not just believing.

What should I do if my website is not managed by you?
Ask your provider which PHP version the server runs and whether it is updated against PHP2Shell. A clear answer should not take more than a few minutes. Feel free to get in touch if you want help assessing the answer or want us to take over your hosting. Contact us directly here: hej@dalarna.digital

Finally

A week like this shows why managed hosting is more than a contract. It is about someone being on top of things when it really matters. That is what we are here for.