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
- Veracode's 2025 GenAI Code Security Report tested AI models on 80 coding tasks and found security flaws in 45% of the code samples, with no improvement in security even as the code got more syntactically correct.
- Cybernews scanned 159,041 Lovable projects and found 24,664 returning database records without a login.
- The Register reported a researcher finding 16 vulnerabilities, six critical, in one Lovable-hosted app that exposed more than 18,000 users.
- Wiz catalogued the most common risks in vibe-coded apps.
The problem isn't one tool. It's shipping code nobody checked.

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.

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.

A pre-launch security checklist
- Search the source and network requests for secret keys.
- Check database access rules on every table.
- Test every admin route logged out.
- Protect every form against spam and abuse.
- Force HTTPS.
- Review and audit dependencies.
- Put accounts in your name, with two-factor authentication.
- 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
- Rotate any exposed keys immediately in the service's dashboard. Assume they've been copied.
- Turn on database access rules and check logs for unusual reads.
- Take the affected feature offline if you can't fix it quickly.
- Tell affected users if personal data may have been exposed. Many countries have legal notification duties.
- 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.





