We need a new security model post-PHP2Shell. It means the end of the open internet.
Like all sysadmins on the afternoon of 21 October 2026, I was sitting with multiple terminal shells open, ready to "apt update && apt upgrade -y". The discovery of the extremely serious PHP bugs, in large part due to AI's assistance in discovering such vulnerabilities, meant dusting off some very old servers and giving them long-overdue updates. We were warned that we had about 15 minutes from the patch coming out until we could expect attacks, so it was pretty important to have our finger on "enter".
This is just the start. I'm very much a Node.js guy, but I discovered I had three servers still running PHP, some still on PHP 5. But I'd be an idiot to think that this problem isn't coming for every backend, be it written in Node, PHP, Python, .Net, or some forgotten relic running Delphi or something. Indeed, this week we got Node2Shell, which is serious, but not quite as big a deal as PHP2Shell.
We should be updating our servers regularly, but I run hundreds of them, and being a sysadmin isn't even my job. Keeping them all up-to-date, even with automated updates and such, would be a full-time job.
And, depressingly, it wouldn't help. We've been lucky so far that these bugs were discovered by researchers, the maintainers had time to create and deploy patches, and the entire internet community came together to make sure stuff got out there lightning-fast. There are hundreds of unpaid volunteers who kept the world's economy running last week by dropping everything to make sure the repos got the patches, so that we could update as the release dropped. But the bugs won't always be discovered by researchers.
Right now there are state-level hacking groups with access to cutting-edge models and no token limits looking for zero-day exploits to screw us over. There are also organised criminal enterprises doing the same. Sometimes, it's the same people. Patching will not stop these attacks, because we don't know the problems exist. The idea that more advanced models will find every vulnerability for us, before dedicated hacking teams, is extremely wishful thinking.
Our old security model is, essentially broken, unworkable, obsolete. We cannot secure our systems in the way we used to.
Don't worry, it's not all doom-and-gloom, there are system models that offer a solution, and conveniently they've been brewing nicely for the last few years.
The first thing we need to do is decouple our front- and back-ends. Modern internet systems architecture has been moving in this direction for years, and while we do have some monoliths (ahem, Wordpress) still hanging on, having an API living on its lonesome, with a thickish server-side renderer-slash-API-middleware in the middle, and a modern Javascript app in the front.
The middle is still a bit thick, often lumped with the data models, business logic, server-side rendering and more. We do need to take a bit of a scalpel to the likes of Nuxt, Next, and SvelteKit, and really separate the concerns of "user" from "system". But we're getting there.
Projects like Astro are great examples of brilliant front-ends that work with whatever backend you happen to be using, with just enough server-stuff to make the transition clean and clear. It also offers some new hosting options – one of the big sites I work on essentially hosts entirely on Cloudflare, which makes it all lightning-fast and ridiculously cheap.
Assuming you've done the hard work, and you have a beautiful three-tier architecture, none of which is particularly novel, it's time for the new stuff: disconnect from the internet. (Kinda.)
As developers, we've gotten lazy. (Well, I certainly have.) The user essentially gets to connect directly to the back-end. Authorised, sure, but they could be anywhere in the world, connecting on whatever shitty, dodgy, compromised public wifi they choose.
That server is sitting on the open internet, happily listening on port 443, 404'ing for every fly-by hack attack looking for an open ".env" file all day. So far, that's been an annoyance, because we're (hopefully) not sending them the .env. But when they're not checking for a .env, they're leveraging a targeted, undiscovered buffer overflow to get shell access to your server, it's a bit more of a worry.
We simply cannot allow our servers to sit on the internet like this anymore. It's urgently time for the big separation, we can argue about who takes the dog later.
Your front-end should only get to talk to its SSR server. The SSR server gets to talk to your API. Your API gets to talk to your databases. No-one else gets to do these things.
Your back-end servers shouldn't even have public IP addresses. You should only be able to reach them through a Wireguard (or similar) VPN.
This would have been hella-difficult a few years ago, but nowadays we have both Wireguard and Tailscale, which makes Wireguard workable for normal humans.
If you're worried about reliance on a third party (and you should be), there's the completely-compatible Headscale, which is what I use extensively for my network.
Even if you're not going to go the full-monty-three-tier-architecture route, I implore you to put something in front of your servers, connected by Wireguard, and get them the hell off the net. I personally like a reverse proxy Nginx, but another new kid which makes all of this easier, Caddy, is another option. I also throw in HAProxy behind the Nginx if I have a DB cluster or a K8s environment to connect to.
Suddenly, your servers are still maintainable, but safe. Or safer, at least. It'll take a lot of work to hack a machine that's disconnected from the Internet. It's not impossible, of course – your reverse proxy is still a weak point for attack – but keep that minimal and up-to-date, and you now have a very small attack surface, and only one server to really stress about.
I do think that the AI CVEpocalypse is survivable, but we are going to have to get a little more serious about our infrastructure if we want to not have our fingers hovering over "enter" in a shell terminal all day.
