45% of AI-generated code contains a vulnerability: what the data on 380,000 apps says
What the RedAccess and Veracode research says about the security of AI-generated code, and the four mistakes that repeat in almost every app.

Luca Di Domenico
· 2 min read
In short
Two independent pieces of research reach the same conclusion. RedAccess scanned around 380,000 public resources built with Lovable, Replit, Base44 and Netlify: more than 5,000 had no adequate protection and nearly 2,000 were exposing sensitive data. Veracode found that 45% of AI-generated code contains at least one OWASP Top 10 vulnerability. The mistakes, though, are almost always the same four.
🚨 They analysed 380,000 apps built with vibe coding. The results are disturbing.
The numbers: 380,000 resources scanned, over 5,000 with no protection
Researchers scanned more than 380,000 public resources created with Lovable, Replit, Base44 and Netlify.
More than 5,000 apps had no adequate protection.
Nearly 2,000 were exposing sensitive data: financial information, corporate documents, private conversations and admin access.
And it doesn’t stop there.
In a separate study, Veracode (the well-known cybersecurity company) found that 45% of AI-generated code contains at least one vulnerability traceable to the OWASP Top 10.
The scan comes from Israeli company RedAccess and was independently verified by Axios on 7 May 2026. The 45% figure comes from the 2025 GenAI Code Security Report by Veracode, which tested over 100 models across 80 coding tasks.
The four mistakes that keep repeating
The most absurd part?
These aren’t sophisticated attacks. It’s almost always the same mistakes.
Here are the main ones:
1. Secrets in the frontend
Stripe keys, API keys and credentials dropped into browser-side code.
2. No Row Level Security
Login works, but without RLS policies users can reach data they should never see.
3. Authentication mistaken for authorisation
Change the ID in the URL and you get another user’s data.
4. Debug routes left public
Endpoints like /debug, /test or /admin end up online with no protection at all (as in the Baudr case by Grenbaud a few months ago).
These are the four checks I run on every release in custom software development projects, along with authentication, permissions, and configuration.
The Moltbook case
Researchers gained full access to Moltbook’s database in a matter of minutes (remember the famous social network for AI agents?), exposing 1.5 million tokens, thousands of emails and private conversations.
All because of a misconfiguration in Supabase’s RLS policies.
The researchers were the team at Wiz, who documented the exposure on 31 January 2026: 1.5 million authentication tokens, 35,000 email addresses and private messages between agents, all reachable through a Supabase key left in the browser JavaScript.
An automated check before every push
💡 A practical tip: if you use Claude Code or Codex, ask it to create a hook that runs before every push to main, checking for exposed secrets, unprotected routes, CORS configuration, RLS policies and authorisation tests, and blocking the push when it finds a problem.
It doesn’t replace a full security review, but it keeps a lot of trivial mistakes from reaching production.
Sources
- AI vibe-coding apps leak sensitive data (Axios) — RedAccess scan of roughly 380,000 public resources across Lovable, Base44, Replit and Netlify, 7 May 2026
- 2025 GenAI Code Security Report (Veracode) — over 100 LLMs across 80 coding tasks: 45% of the code contains an OWASP Top 10 vulnerability
- Hacking Moltbook: AI Social Network Reveals 1.5M API Keys (Wiz) — 31 January 2026: 1.5 million tokens, 35,000 emails and private conversations, from Row Level Security never enabled on Supabase
- The strange case of Baudr, the social network built by Grenbaud — March 2026: admin panel publicly reachable (in Italian)
- OWASP Top 10 — the reference list of the most widespread application vulnerabilities
Want to know what this means for your product?
If you're building software with AI and want a second opinion on how you're working, tell me about your project.
Related articles
Keep reading
An OpenAI model escaped its sandbox and breached Hugging Face on its own
Read: the OpenAI model that escaped its sandbox