Vibe coding security: the 10 most common vulnerabilities in AI-generated websites and apps
Contents
The term "vibe coding" goes back to a post by Andrej Karpathy in February 2025: you describe what you want, accept what the AI writes and hardly look at the code any more. For prototypes that is a real productivity gain. As soon as real users, real data or real payments are involved, the same habit becomes a risk, because nobody has read the parts that decide who may see what.
Most of the problems below are not new. They are the classics of web security, listed in the OWASP Top 10:2025 as Broken Access Control (A01), Security Misconfiguration (A02) and Software Supply Chain Failures (A03). AI tools simply make them easier to ship, because they optimise for "it works" and the person prompting rarely asks "who else can call this?".
Why are vibe-coded apps especially exposed?
Three things come together. First, the generated code usually runs, so there is no error message that would force anyone to look closer. Second, many AI app builders connect a hosted backend such as Supabase or Firebase directly to the browser, which moves the security boundary into database rules that are easy to leave open. Third, the apps go live fast and are often found by automated scanners before the developer has finished testing.
A documented example: in spring 2025 a security researcher scanned apps from the Lovable showcase and reported 303 endpoints in 170 of 1,645 analysed projects whose Supabase Row Level Security was missing or insufficient, so data could be read or written without logging in (Matt Palmer, statement on CVE-2025-48757). The entry was published as CVE-2025-48757; Lovable disputes it and points out that each customer is responsible for protecting their application's data. Whoever is responsible, the lesson is the same: the generator does not take the security decision away from you.
What are the 10 most common vulnerabilities in vibe-coded websites?
1. Secrets in the frontend bundle or the repository
Payment keys, LLM API keys or database admin keys land in client code because the AI put them where the feature worked first. Build tools make this easy: Vite exposes every variable starting with VITE_ in the bundle and warns that these must not contain secrets (Vite docs); Next.js inlines every NEXT_PUBLIC_ variable into the JavaScript sent to the browser (Next.js docs). Anything in the bundle is public. We cover how to find and rotate such keys in API keys and secrets in the frontend.
2. Authorisation only in the user interface
The AI hides the admin button for normal users, but the API route behind it accepts every request. Or a URL like /api/invoices/123 returns any invoice once the number is changed. Every request that reads or changes data must be checked on the server: is this user logged in, and may this user access exactly this record?
3. Open database and storage rules
With Supabase, tables in an exposed schema need Row Level Security, otherwise the public key in the browser can read and write them (Supabase docs). With Firebase, "test mode" grants access to everyone, and Google warns that anyone who knows the project ID can then steal, modify or delete data (Firebase docs). The same applies to file storage buckets that allow public listing. Details and SQL examples: Supabase and Firebase: open database rules.
4. Debug mode, admin panels and development servers left public
Development servers on ports such as 3000, 5000 or 8080, database admin tools, a forgotten /admin route or a framework in debug mode with detailed stack traces. Verbose error pages reveal file paths, library versions and sometimes queries, which saves an attacker a lot of guessing.
5. Exposed .env files, .git folders and source maps
If the web server delivers the project folder as it is, files like /.env or the /.git/ directory may be downloadable, and with them passwords and the complete source history. Public source maps make the original source of the frontend readable. Check that your deployment only serves the build output.
6. Permissive CORS
A backend that copies every requesting origin into Access-Control-Allow-Origin and also sends Access-Control-Allow-Credentials: true lets any other website read authenticated responses in the name of your logged-in users. AI-generated backends often start with "allow everything" to make the first request work. Allow only the origins you actually use. The browser rules are explained in the MDN guide to CORS.
7. Outdated or invented dependencies
Generated code pins whatever version the model knew, which may have known vulnerabilities. A newer risk: models sometimes suggest packages that do not exist. A study presented at USENIX Security 2025 found hallucinated package names in at least 5.2 percent of samples from commercial models and 21.7 percent from open-source models (Spracklen et al.). Attackers can register such names with malicious code. Check every new package before you install it, and run npm audit or your ecosystem's equivalent.
8. Missing HTTPS, HSTS and security headers
Hosting platforms usually provide HTTPS, but custom domains, old subdomains or an API on a separate host are often missing a redirect or the Strict-Transport-Security header. A Content-Security-Policy limits the damage of injected scripts, X-Frame-Options or frame-ancestors prevents clickjacking, and session cookies need the Secure, HttpOnly and SameSite flags.
9. No rate limiting
Login, password reset, sign-up and above all AI endpoints need limits per user and per IP address. Without them, attackers can guess passwords, flood your mail sender or run up your LLM bill through an endpoint that forwards prompts to a paid API.
10. Prompt injection in AI features
If your app passes user input, web pages or uploaded files to a language model, that content can change the model's behaviour. OWASP lists this as LLM01:2025 Prompt Injection (OWASP GenAI). Never give the model more rights than the user has, keep system prompts free of secrets and treat model output as untrusted input, especially before it reaches a database, a shell or another user's browser.
What can be checked from the outside, and what cannot?
Some of these weaknesses are visible to anyone on the internet, others only in the code or in the backend configuration. Knowing which is which helps you plan.
| Weakness | Visible from outside? | How to check |
|---|---|---|
| Open ports, development servers, admin tools | yes | external port and service check |
| TLS certificate, HTTPS redirect, HSTS, security headers, cookie flags | yes | external check of the web server |
| Software versions with known CVEs | partly, if the server discloses its version | external check, dependency audit |
| Forgotten subdomains | yes, via certificate transparency logs | external check |
| Secrets in the bundle, source maps | yes, but only by reading the delivered JavaScript | search the build output, secret scanner |
| Open Supabase or Firebase rules | only with requests against the backend | backend dashboard, policy tests |
| Missing authorisation, rate limiting, prompt injection | no | code review, tests |
athorion's free check measures the first group passively and non-intrusively: open ports and services, TLS certificates, the HTTPS redirect, security headers and cookie flags, disclosed software versions matched against known CVEs, subdomains from certificate transparency logs and the mail settings of your domain. It does not log in, does not read your JavaScript bundle and does not test your database rules, so it does not replace a code review for the other points. The AI attack check shows what automated attackers see first, and the platform describes how the same checks run continuously.
In which order should you fix things?
- Rotate every secret that has ever been in the frontend or a repository, then move it to the server.
- Lock the database: enable RLS or real Firebase rules on every table and bucket, then test as a user who is not logged in.
- Check authorisation on every API route on the server, not in the user interface.
- Close everything that is not needed publicly: debug mode, admin tools, development ports.
- Set HTTPS, HSTS, security headers and cookie flags, then add rate limits.
- Audit dependencies and repeat the external check after every release.
For the last step before going live, use our pre-launch security checklist.
Frequently asked questions
Is vibe coding insecure by definition?
No. The tools generate code of very mixed quality, but the risk comes from shipping it unread. With a clear review of authentication, authorisation, secrets and database rules, a vibe-coded app can be as secure as a hand-written one.
Are the Supabase anon key and the Firebase API key secrets?
No, both are designed to be public. Supabase describes its publishable key as safe to expose and limited by RLS (Supabase API keys); Firebase says its API keys may be included in code (Firebase API keys). The protection comes from the rules, which is exactly why open rules are so dangerous. The Supabase secret or service_role key, on the other hand, must never reach the browser.
Can an external scan find all of these problems?
No. An external, non-intrusive check sees what the server shows to everyone: ports, certificates, headers, versions, subdomains. Logic errors such as missing authorisation can only be found in the code or with authorised tests.
How often should I check?
After every deployment that changes infrastructure, domains or dependencies, and otherwise continuously. New subdomains, expiring certificates and new CVEs appear without any change on your side. The Nightly Audit + Seal runs the external check every night; pricing lists all plans.
Check your app from the outside now
Before an attacker's scanner does it, see what your domain shows to the internet. The free check runs passively in about two minutes, without login and without touching your data.
Sources
- OWASP Top 10:2025
- OWASP GenAI, LLM01:2025 Prompt Injection
- Matt Palmer, statement on CVE-2025-48757 and Tenable, CVE-2025-48757
- Supabase, Row Level Security and API keys
- Firebase, avoid insecure rules and API keys for Firebase
- Vite, env variables and modes and Next.js, environment variables
- Spracklen et al., package hallucinations by code generating LLMs (USENIX Security 2025)
- MDN, Cross-Origin Resource Sharing
Researched and structured with AI assistance, reviewed for accuracy by Robin Schwarzfeld.