I don't know. Still, at a time like this I would expect a 99% static public website to be up, running and serving all comers. This is a complete mission fail, both in terms of using PHP and in terms of not having a fall-back plan in place.
Due respect, neither of those make sense. PHP is boring software, and this website routinely suggests (1) use it if it is fit for purpose and (2) don't rewrite for the sake of it. For most sites, the engineering effort to have a static backup of their dynamic website (say, generated by Wordpress or Drupal) just isn't possible. They just need to power down and patch.
[EDIT: I see I may have erroneously extended your criticism to sites other than NCSC, for which it does make sense. I would still defend using PHP.]
Because websites with news, continuously updated advice, job openings, etc aren't all that static? This type of site hugely benefits from having a easily understandable CMS that you can teach to more or less everyone in 2 days or less. I suffered through a few of those back in my time in the military, where an instructor would teach a class of 20-30 how to build new pages in the CMS
Now are there more powerful tools out there that result in more scalable websites? Sure. My personal sites are built around static site generators for that exact reason. But none of better tools are as easy to understand for non-programmers as wordpress or one of the other click-and-drag CMS tools.
PHP is going to publish the patch in 5 minutes, right? On their website which runs on... Perl Catalyst? Ruby on Rails? Django? What could possibly go wrong?
Tons of sites are currently offline to hopefully prevent an attack until they can update PHP; just the things I've run into this morning: OBS, TicketTailor, tons of wikis...
I thought they were down earlier, but apparently they were just pre-announcing being down in about 30 minutes, until they finish patching their servers.
I've seen a number of notifications on X and Bluesky of people taking their sites offline, though. Supposedly Cloudflare is providing all customers a WAF rule that will mitigate the exploits they've been able to see so far (though they mention, this is not full protection—patching is still required).
Which kind of makes sense, I think a lot of Dutch websites have been taken offline. I think it’s due to recent regulations that have been introduced.
I think, given the (supposed) seriousness of this issue, it’s an adequate response. I suspect Cloudflare et al will have rules added to their managed WAFs within a few hours after release as well.
That said: it seems like the core issue is that they can’t release PHP publicly without revealing the exploit, wouldn’t it have made more sense to coordinate in the background with these organizations, and important distros, so that this could have been patched without revealing the exploit?
Yes our university is doing the same right now! They where thinking of putting the whole network behind VPN access to protect the poor sysadmins in the Institutes that have not updated their website in years…
It creates an absolutely enormous political snarl to decide who is "worthy" of getting advance notice on something like this, and to correctly determine who is capable of keeping the secret in the presence of highly motivated active attackers who may have capabilities all the way up to and including "state level actors".
Basically, it's only possible in our imaginations where we don't have to get into the nitty-gritty of exactly who gets what notifications. It isn't possible in reality for something this large and consequential.
I just moved my last PHP site, my personal blog, to a static site generator. It looks like my timing was lucky!
The only significant thing lost of comments, but they have been getting more spammy over the years. Its actually better now too in many ways and I fixed various issues during the move.
Which is why suggestions like OP’s are never useful or actually serious. I honestly consider them snobby. Like the person who tells you you really ought to check your engine oil, radiator fluid, and brakes everytime you get in a car. It would prevent some awful issues sure, but it’s not gonna happen for 99% of people.
Having static site generator still require an admin endpoint that end users can use to author, publish or otherwise manage the content. Pushing that to a local tool means now you need to somehow synchronize that content across all of the end users devices without git. Not to mention if there is no server side component that means the client needs to have full permission to publish content on the server. Until recently ssh was the only option. Maybe someone could vibe an iroh app that gives you a vpn'd server side app without that now.
Did you try to implement it seriously? Naturally you need an admin endpoint, it just does not have to be reachable for everybody from the internet, just via your VPN. Big difference.
The person you're replying to didn't mention a static site generator. You could simply use Vinyl(fka Varnish), and after you pulled your PHP down, your boring brochure site would still be up.
The first site I put up professionally was a handrolled static generator written in PHP for a state website. Users just edited text files, triggered a rebuild, and then there was a sync to prod if staging looked fine. They could even add new sections by creating new subdirectories, and Imagemagick would automatically conjure new menu buttons and the code would put them in the right place.
> Pushing that to a local tool means now you need to somehow synchronize that content across all of the end users devices without git.
This is not hard. Rsync? Rsyncd?
> Not to mention if there is no server side component
Why would there be no server-side component? What does that even mean? Just give them a script to trigger if you don't want them to have permission to do anything. Give them another script to revert if you don't want to get any emergency calls.
This is not advanced technology. Weird to talk about it like it's impossible.
> never useful or actually serious
So strange. That site was so simple to deal with that it stayed up for a decade after I left. Ancient technology.
Generate static pages from your content system. Even for wordpress there's some projects.
If you need adaptations, AI should be helpful.
You can sell this also to bosses: Delivery of static sites consumes drastically less resources.
Because every once-in-a-lifetime AI is invented and finds security flaws in PHP? Seems like you are coming to an overly broad conclusion here. Besides, you have to serve the static HTML somehow, and Apache and Nginx have had plenty of security vulnerabilities.
PHP is worse in this aspect with its long tail of legacy and staying close to C. It's absolutely possible that memory-unsafe Python interpreters could have something vaguely similar, but it's much less likely. Plus there are Python interpreters in memory-safe languages.
In any case, memory-unsafe codebases will continue to be a significant danger. Be it in interpreters or anywhere else. Just like they have been for the past 20+ years.
>Safely ahead in a digitally resilient Netherlands.
Things being offline seems like a daily occurrence recently. Is it a co-incidence? Is it AI? Are Russia/Iran doing an e-blitzkrieg?
If it's a combination of all three, surely nation states are going to unleash everything possible right now and do as much damage before the world adapts and becomes resilient?
If the latter, would be interesting to put an actual cost on all this downtime and whether it's actually making any impact, or is just noise/free training.
> Today, a remote code execution vulnerability was found in PHP, called php2shell.
[...] Since explain xkcd is affected by this exploit, I have decided to take the wiki down until tomorrow.
61 comments
[ 0.21 ms ] story [ 3.7 ms ] thread[EDIT: I see I may have erroneously extended your criticism to sites other than NCSC, for which it does make sense. I would still defend using PHP.]
Now are there more powerful tools out there that result in more scalable websites? Sure. My personal sites are built around static site generators for that exact reason. But none of better tools are as easy to understand for non-programmers as wordpress or one of the other click-and-drag CMS tools.
That you want your content to be readable from everyone doesn’t mean you want the admin interface to be available globally.
https://yle.fi/a/74-20252600
https://github.com/php/web-php
I've seen a number of notifications on X and Bluesky of people taking their sites offline, though. Supposedly Cloudflare is providing all customers a WAF rule that will mitigate the exploits they've been able to see so far (though they mention, this is not full protection—patching is still required).
I think, given the (supposed) seriousness of this issue, it’s an adequate response. I suspect Cloudflare et al will have rules added to their managed WAFs within a few hours after release as well.
That said: it seems like the core issue is that they can’t release PHP publicly without revealing the exploit, wouldn’t it have made more sense to coordinate in the background with these organizations, and important distros, so that this could have been patched without revealing the exploit?
Basically, it's only possible in our imaginations where we don't have to get into the nitty-gritty of exactly who gets what notifications. It isn't possible in reality for something this large and consequential.
The only significant thing lost of comments, but they have been getting more spammy over the years. Its actually better now too in many ways and I fixed various issues during the move.
Unfortunately my static HTML is pre-rendered by a PHP engine before being served.
These particular vulnerabilities affect PHP scripts accepting POST requests as far as I've been able to gather so far.
Having static site generator still require an admin endpoint that end users can use to author, publish or otherwise manage the content. Pushing that to a local tool means now you need to somehow synchronize that content across all of the end users devices without git. Not to mention if there is no server side component that means the client needs to have full permission to publish content on the server. Until recently ssh was the only option. Maybe someone could vibe an iroh app that gives you a vpn'd server side app without that now.
The first site I put up professionally was a handrolled static generator written in PHP for a state website. Users just edited text files, triggered a rebuild, and then there was a sync to prod if staging looked fine. They could even add new sections by creating new subdirectories, and Imagemagick would automatically conjure new menu buttons and the code would put them in the right place.
> Pushing that to a local tool means now you need to somehow synchronize that content across all of the end users devices without git.
This is not hard. Rsync? Rsyncd?
> Not to mention if there is no server side component
Why would there be no server-side component? What does that even mean? Just give them a script to trigger if you don't want them to have permission to do anything. Give them another script to revert if you don't want to get any emergency calls.
This is not advanced technology. Weird to talk about it like it's impossible.
> never useful or actually serious
So strange. That site was so simple to deal with that it stayed up for a decade after I left. Ancient technology.
(So old.....)
In any case, memory-unsafe codebases will continue to be a significant danger. Be it in interpreters or anywhere else. Just like they have been for the past 20+ years.
Dark day for Drupal and Wordpress, heh
Once it's out it's likely to be an easy "disable this damnable feature nobody needs" as usual.
There's no such thing as PHP 6. There's no such thing as PHP 9.2.
>Safely ahead in a digitally resilient Netherlands.
Things being offline seems like a daily occurrence recently. Is it a co-incidence? Is it AI? Are Russia/Iran doing an e-blitzkrieg?
If it's a combination of all three, surely nation states are going to unleash everything possible right now and do as much damage before the world adapts and becomes resilient?
If the latter, would be interesting to put an actual cost on all this downtime and whether it's actually making any impact, or is just noise/free training.
> Today, a remote code execution vulnerability was found in PHP, called php2shell. [...] Since explain xkcd is affected by this exploit, I have decided to take the wiki down until tomorrow.