PHP is still pretty dang big, and yes there will always be an exploit but... this one is a doozy. If you haven't patched your PHP servers yet, stop now and go do that. Then come back, read this article, and let's talk about rewriting your app so it doesn't need an extra rendering layer.

The actual attack is really simple… they jus send one POST to the front page of a PHP site and give it one form field whose name is about 3.5 megabytes long. There's a kind of complex payload involved, but with one simple command against any vulnerable website (and we're talking maybe 2 MILLION web hosts) , they can run any command on your server.. (Datadog has the full walk-through.)

Over 2 million servers just ripe for the picking... WordPress and Drupal sites are huge, so manhy blogs and company sites built on that full stack... Even Facebook still has a lot of PHP that could get attacked. Any PHP site is vulnerable using every way PHP takes web requests: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, LiteSpeed...

The broken code goes back to PHP 5.4. PHP runs 69.3% of websites whose server-side language is known, and one researcher puts exposed, potentially vulnerable hosts above 1.3 million.

This stuff moves pretty fast these days, it was discovered on Oct 17th, announced on the 20th and a fix was out by the 21st, but in the era of AI that left four days that we KNOW about... And let's be honest, PHP is an older language, on older, neglected machines. I THINK I patched the only PHP server I'm still responsible for but... hmm... maybe I should go look again.

This is CLASSIC full stack. WordPress is just how you publish your company blog, you don't think about Apache, MySQL, Debian or, in this case, PHP. It's way down in the guts of the machine with everything else, and to be honest, we usually figure someone else is taking care of it.

Rule 5  says every dependency is a decision. We don't usually think of PHP as a decision, it's just... there. But if this exploit doesn't make it clear that you need to think, "Do I really need to compute my presentation layer? on a server?" I don't know what will.

And now with AI helping deploy these attacks, well it went pretty fast 

PHP2Shell: exploit attempts went from thousands before disclosure to millions within hours; versions 8.2 to 8.5 got fixes, 7.4 to 8.1 source backports, 5.4 to 7.3 nothing

Sources: The Register, Amazon Threat Intelligence.

Even though we don't run PHP on this site, it's telling that when we dug through our own logs there was a lot more traffic looking at phpinfo right after the disclosure… that is to say, the disclosure of the exploit helped increase the search for PHP servers they can exploit. They don't have to hit you with the exploit at first, just troll, find out if you're vulnerable, then call in the big boys to do the real exploit.

If you are responsible for some WordPress or Drupal server and you're saying, “There is NO WAY I can convince the team to drop it,” you don't need to abandon it, but you might consider a little refactor… 

  1. Run the CMS somewhere private. WordPress admin and its PHP live behind a VPN or zero-trust access. Sophos said the same this week: if you can't patch, put PHP behind network-layer authentication.
  2. Publish files, not a server. On every save, render to static HTML and push it to object storage behind a CDN. That's what readers hit.
  3. Keep the live bits small. Contact form, newsletter signup, comments: each a small function on its own route that accepts one shape of request.
  4. Patch on your schedule. The private box still needs this week's update. You install it Tuesday, not at 3 a.m.

Yes, there are reasons you might need PHP and a full WordPress stack, like woocommerce plugins so you can run your store and get paid. There are other ways to do that, and migrating off that full stack is pretty much what I'm preaching here, but in the meantime -- go patch your server!

But really, the question this week isn't whether you patched. It's why your homepage was running a program at all.