All posts

Why AI-built websites get hacked: security basics before you go live

AI-built sites get hacked for the same few reasons: exposed secret keys, databases without access rules, open forms and admin pages, and unchecked packages. Researchers found thousands exposing data. The basics to check.

AI-built websites get hacked for the same few reasons: secret keys exposed in the browser, databases without access rules, unprotected forms and admin pages, and packages nobody reviewed. Researchers have found thousands of AI-built apps exposing data. Here are the security basics to check before you go live.

"ai built website checker" is a growing search, and for good reason.

The evidence

The problem isn't one tool. It's shipping code nobody checked.

Three statistics: 45% of AI code samples had flaws, 24,664 Lovable projects exposed data, 8 of 8 AI tools failed social SEO
AI builds fast. Someone still has to check it.

The five most common holes

1. Secret keys in the browser

AI tools sometimes put API keys straight into front-end code. Anyone can open the page source or developer tools and copy them. Then they can run up your bill or read your data.

Fix: keep secret keys on a server, in environment variables. Only publishable keys belong in the browser.

2. Databases without access rules

Many AI app builders connect a database like Supabase. If row-level security or equivalent rules are off, anyone who finds the public key can read or change data. This was the main cause of the exposed Lovable apps researchers found.

Fix: enable access rules on every table holding personal data, and test them while logged out.

3. Forms that anyone can abuse

Unprotected forms get spammed, or used to send email on your behalf.

Fix: a honeypot field, rate limits, a timing check, and a challenge like Cloudflare Turnstile. My own contact form uses all of these.

4. Admin routes left open

Generated apps sometimes include admin or dashboard pages that only hide a link, not the page itself.

Fix: visit every admin route while logged out. If it loads, it's open.

5. Packages nobody checked

AI can add libraries that are outdated, unnecessary, or don't exist (with malicious look-alikes waiting).

Fix: review every dependency; remove what you don't need; run an audit tool.

Five common security holes: secret keys, database rules, open forms, admin routes, packages
Each one is quick to check.

The safest option for a marketing site

A marketing website doesn't need a database or login on the public site at all. A static site, like the Astro sites I build, is a set of ready-made files. With no database, no admin login and no server code on the public pages, there's very little to attack. Forms can be handled by a small, well-protected endpoint.

Two lists comparing the attack surface of an AI-built app and a static marketing site
A marketing site rarely needs a database.

A pre-launch security checklist

  1. Search the source and network requests for secret keys.
  2. Check database access rules on every table.
  3. Test every admin route logged out.
  4. Protect every form against spam and abuse.
  5. Force HTTPS.
  6. Review and audit dependencies.
  7. Put accounts in your name, with two-factor authentication.
  8. Back up the code and content.

The full launch list is in my AI website launch checklist.

What to do if you find a problem

  1. Rotate any exposed keys immediately in the service's dashboard. Assume they've been copied.
  2. Turn on database access rules and check logs for unusual reads.
  3. Take the affected feature offline if you can't fix it quickly.
  4. Tell affected users if personal data may have been exposed. Many countries have legal notification duties.
  5. Fix, test and document what changed.

How AI tools are improving

Builders are responding. Lovable, for example, says projects include a security scan before publishing, according to The Register's reporting. Expect more automated checks across tools in 2027. They help, but they don't replace a person who understands what the app does with data.

When to get a professional

If your site handles logins, payments, health information or customer records, get a security review before launch. It costs far less than a breach.

Frequently asked questions

Are AI-built websites safe?

Simple static sites can be. Apps with databases often aren't until someone checks access rules, keys and forms.

How do I check if my AI-built site is secure?

Look for exposed keys, test database rules and admin pages while logged out, protect forms and audit dependencies.

Is Lovable safe to use?

Lovable offers a security scan before publishing, but researchers have found many apps with exposed data. Review security yourself or with a developer.

Sources

Work with Jeo Web Studio

Tell us about your business and what you want the site to do. Rough notes are fine. We will reply with honest advice, a plan and a fixed price, or tell you plainly if we are not the right fit.

Book a discovery call

A free 30 minute video call. Talk it through before you commit to anything.

Pick a time

Or tell us about your project

We only use your details to reply. See our privacy policy.