In October, researchers found a serious flaw in PHP. PHP is a programming language that has been around for a long time and runs a large share of the web, WordPress included. It was bad enough that the UK's National Cyber Security Centre told organisations to update PHP or take their systems offline until they were patched.
The researchers say AI models helped them turn the flaw into a working attack. The same AI that helps find a flaw makes it a lot faster to attack one, so once a hole is public, getting it patched matters more than it used to.
When the news came out, the first thing I did was check all of my sites. Luckily PHP is not something I use, so it was not in any of them. But next time it could be whatever my sites are built on, so how do I keep my sites and my clients' sites safe without spending a fortune on security?
I want to be clear that I am not a security expert. I build websites, I vibe code a lot of them, and I have shipped tens of them this year. This is my own research and what I did on my own sites. If your site handles payments or customer data, find the budget to hire a security expert to look over it. Treat this as a starting point.
I look at it as five doors that lead into your website. I will go through them one by one, starting with the one that matters even if you have never touched code.
Door one, your accounts
The first way into your website has nothing to do with the website itself. It is all the accounts that go into running it.
You have the domain, which you bought from a registrar, so that is an account. You have the hosting company, which owns the computer your site actually runs on, and you have an account there too. Then there is your email, GitHub if your site has code, and whatever plugins or platforms collect your form submissions.
The one that matters the most on that list is your email. Every other account has a "forgot password" button, and that button sends a login link to your email. So if your email gets compromised, pretty much every platform you have ever used is compromised with it.
The fix, on your email first and then on everything else, is two-factor authentication. It means that on top of your password you need something else to prove you are who you say you are. The common version is a code sent to your phone by text message, which is better than nothing but the weakest option. An authenticator app is better, and a hardware key on top of that if you can. I do not think this is optional anymore, because if your passwords have not leaked yet, there is a good chance they will.
While you are in there, list every platform you have ever registered on and delete the accounts you do not use. Every account you keep is one more place somebody can get your details from. I did this myself after the PHP news. And if you are not sure whose account your domain actually sits in, I wrote about what a web designer actually needs from your domain.
Door two, your keys
The second door is keys, specifically API keys. An API key is basically a password, but for a program instead of a person. Whoever has it can act as if they are you. It is how your site talks to your email tool, how it talks to your payment provider, and how an AI tool talks to any platform outside your site.
The problem is where these keys end up, especially when you vibe code. It is really easy for the AI agent to put a key in the front end of the site, in the code that gets sent to the visitor's browser. Anybody can open the source or the network tab and read it. And once somebody has it, they can use it as you and run up your bills.
Next.js is a good example. Anything you name with NEXT_PUBLIC at the front gets pushed straight into the code people download, so even if you never meant to, that value is now public.
So keys live in the back end. In practice you go to your hosting service, find the settings called environment variables, and set the name and the value of the key there. Pretty much every host has this. Your site reads the key on the server and it never reaches the visitor. On Vercel, which is what I use, you can also mark a variable as sensitive, and after you add it you cannot even read it back yourself, which is how it should work.
Now, if you have been building for a while, there is a good chance a key has slipped out at some point. Maybe you pasted it into your AI chat, or maybe it got pushed to GitHub by accident. Even if the GitHub repository is private, deleting the key from the code is not enough, because it stays in the history. The same goes for the chat. The key is in the chat logs, so the company behind that AI has it now. Treat it as exposed.
Do not fall for the idea that you are a small business and nobody is going to bother with you. These attacks are so easy to run now that they are not really targeted. They are sweeps of the whole internet looking for any exposure they can find.
When a key gets exposed, go to whoever gave it to you, delete the old one and create a new one, because an old key still works just as well as a new one. Beyond that, try to rotate your keys about once a month. I had got lazy with this myself, so after the PHP news I went through every key I have ever used and deleted the old keys and connections I no longer use.
Door three, the code your site is built on
The third door is the code your site is built on. Pretty much no site is built from scratch. It uses packages written by other people, and those are called dependencies. Next.js is one, PHP is one, and every plugin on a WordPress site is one.
Every now and then somebody finds a hole in one of them. In December 2025 there was one in React, which a lot of Next.js sites run on, and the fix was simply updating to the new version. The problem is that you need to know about the update to apply it, which is exactly what happened with PHP. People had to wait for the patch, and then they had to know it was out.
The free fix here is GitHub's own Dependabot. In your repository settings, go to code security and switch on Dependabot alerts. From then on, when one of your dependencies has a known hole, GitHub tells you, so you know what to update.
There is also an option where Dependabot pushes the updates for you automatically. I do not recommend that. I turn on the alerts and apply the updates myself, because there have been cases where the bad code came in through the update. In September 2025 a worm spread through hundreds of npm packages and stole developers' keys. So treat the alert as a reason to look, and then look.
If your site is on WordPress, the PHP flaw is the one case where updating WordPress or your plugins does not fix it. PHP runs on the server, which is your host's job, so ask them whether your server is on a patched version of PHP.
Door four, your forms
The fourth door is your forms. For a service business that is usually a contact form or a booking widget. An online shop or an app gets a lot more complicated, which is part of why I gave the disclaimer at the start. But even a plain form needs some care, because it is the one place where anybody on the internet can send you something, bots included.
On my own site and the sites I build for clients, I have a checklist for forms.
Input validation. Check that what people type matches what you expect, so emails look like emails and phone numbers look like phone numbers. Forms often get used to attack servers, by sending snippets of code that mess with your plugins and back end.
A captcha. That is the "are you a robot?" check you see all over the web, and it is there for a reason. I use Cloudflare's, which is called Turnstile, and it is pretty much free. It only works when your server checks the result, because a check that only runs in the browser can be skipped.
Rate limiting. Limit how many times one visitor can send the form in a minute, so nobody can just hammer your back end.
A honeypot. This is a hidden field that people never see but bots do. When it comes back filled in, your site knows a bot sent it.
None of this alone saves you. If somebody really wants to get in, they have plenty of tools to do it. But because these attacks are mostly sweeps looking for small openings, putting as many of these in place as you can filters out a lot of the junk.
Door five, what is public
The last door is one I only found out about very recently, even though I have been building sites for a while. Everything published on your site is public. You can right click on any website, view the source and read every single thing that is in it.
When you vibe code a site, the AI agent tends to push a lot of information into that source that does not need to be there. In my case, every site I made over the last year had developer comments sitting in the source, readable by anybody. They did not include any keys, Claude did not do that. But they gave away my thought process behind the site, what I used as inspiration, and what kind of setup and back end the site runs on. That is information a competitor would love, and it is the kind of detail somebody can use for phishing.
So prompt your agent to check everything it has made public, and to look at the source code specifically.
The same goes for preview links. While you build, your host gives you test versions of the site, and you may have ports open on your own machine while you test. On Vercel there is a setting called deployment protection that puts those previews behind a login, and a lot of other hosts have something similar. That way a variable that ended up in the front end by accident is not sitting on a public link.
And if your site has a database, like a lot of the apps built on Lovable and Supabase, there is a setting called row level security. It is the set of rules for who is allowed to read which data. I do not vibe code apps much myself, but if you have a database, switch it on. A researcher went through 1,645 apps from Lovable's showcase and found 170 where the data could be read using only the public key that sits in the page. And asking your AI agent "is this secure?" is not enough, because it will tell you yes. You have to ask it specific questions and run it through specific attack scenarios before it picks these things up.
What to do with this
So that is the five doors: your accounts, your keys, the code your site is built on, your forms and what is public. None of it makes a site unhackable. It means fewer doors are open, and when one needs fixing, you hear about it.
The PHP flaw has a lesson here too. It was found by specialised researchers who knew that code well and already had theories about how to break it, and AI helped them turn those theories into a working attack. Ask an AI agent to "look for gaps in my code" with no direction and it tells you everything is fine.
So when you prompt your AI about security, give it this list and ask whether your site has addressed it, door by door. And if your site handles payments or customer data, hire somebody who does security for a living, because a lot of these problems cannot be found by prompting alone.