AI tools can produce a working web app in minutes. Security researchers who examined thousands of these apps in 2025 and 2026 found that a large share leaked data or contained serious holes – usually the same few mistakes, over and over. The good news is that those mistakes are predictable, which means you can check for them.
The most common problems
1. Secrets in front-end code
API keys for AI services, payment providers or databases end up in the JavaScript that every visitor downloads. Anyone can copy them and run up your bill or read your data. Only keys explicitly designed to be public may appear in front-end code.
2. Databases without access rules
Popular back-end services used by vibe coding tools rely on database rules (for example row-level security) to decide who may read which rows. If those rules are missing, anyone who knows the project address can read or change all data. This exact mistake caused several high-profile leaks of AI-built apps.
3. Missing authorisation
The page checks that you are logged in, but the API behind it does not check whose data you request. Changing an ID in the address reveals other users’ data.
4. Invented packages (“slopsquatting”)
AI sometimes suggests software packages that do not exist. Attackers register those names with malicious code, waiting for someone to install them. Check every new dependency before installing it.
5. Prompt injection
When an AI agent or chatbot reads web pages, files or emails, instructions hidden in that content can hijack it. Never let an AI with access to your accounts or servers act on untrusted content without your approval. The OWASP Top 10 for LLM applications describes these risks in depth.
Pre-launch security checklist
- Search the built files for keys: words like
secret,service_role,sk_,api_key. - Keep secrets in environment variables on the server, never in the repository or browser code.
- Enable and test database access rules on every table: log in as user A and try to read user B’s data.
- Check that every API route verifies authentication and authorisation.
- Validate and escape all user input; test forms with odd characters and very long text.
- Add rate limits to logins, forms and AI endpoints.
- Set security headers, such as a Content Security Policy and HSTS (see HTTPS).
- Review every dependency: does it exist, is it maintained, is the name spelled correctly?
- Set spending limits at every AI and cloud provider.
- Make backups and know how to restore them.
Review this project as a security auditor. Look for: secrets in client
code or the repository, missing access rules, missing authorisation on
API routes, unvalidated input, XSS, insecure dependencies. Explain each
finding, its risk and the fix. Do not change code yet.Running WordPress? See also our WordPress security checklist. Working with XML in Java? Our secure XML parsing guide covers a classic injection risk that AI-written code still gets wrong.
Frequently asked questions
Is a static website built with AI safe?
Much safer than an app, because there is no database or login to break into. Still check for exposed keys, external scripts you did not intend and forms that send data to unknown services.
How do I check an AI-built app for security problems?
Use the checklist on this page, ask an AI to review the code for security issues, run a scanner, and for anything that handles personal data or payments, pay a professional for a review before launch.