Vibe coding is fine for prototypes and internal experiments, but risky for production apps that handle customer data or payments unless the code is reviewed and secured. The evidence is now hard to ignore: a June 2026 academic audit of vibe-coded applications found that 91% contained at least one vulnerability, and about two thirds of those vulnerabilities were rated critical or high severity, mostly broken access control, injection and authentication flaws. The fix is not to stop using AI. It is to put engineering discipline around what AI produces.
What is vibe coding?
"Vibe coding" describes building software mainly by describing what you want to an AI tool and accepting the code it generates, often without reading it closely. The term was popularised by AI researcher Andrej Karpathy in early 2025, and a wave of tools now lets founders, marketers and operations teams create working web apps from prompts in hours.
That speed is real and valuable. The problem is that "it works when I click through it" is not the same as "it is safe when a stranger attacks it."
What does the research say about vibe-coded app security?
| Finding | Source |
|---|---|
| 91.0% of audited vibe-coded applications had at least one vulnerability; 65.77% of the vulnerabilities found were rated Critical or High, concentrated in broken access control, injection and authentication failures | Deng, Fan and Meng, "Understanding the (In)Security of Vibe-Coded Applications," arXiv, June 2026 (200 deployed apps plus 9,041 open-source projects) |
| Better prompts and agent tooling reduced the risk but did not eliminate it | Same study |
| In the SusVibes benchmark (ICML 2026), 57% of solutions from a leading coding agent were functionally correct but only 11.8% were secure | SusVibes benchmark, as reported in 2026 security research |
| 19.7% of 2.23 million AI-generated code samples referenced at least one software package that does not exist, an opening for "slopsquatting" attacks | Cloud Security Alliance research note, 2026 |
The pattern is consistent: AI is very good at producing code that runs, and much less reliable at producing code that is secure by default.
What are the most common security risks in AI-built apps?
1. Broken access control
The app checks that a user is logged in but not whether they are allowed to see this record. Changing an ID in a URL or API call reveals another customer's data. This is the most common critical issue in the research above.
2. Exposed databases and missing row-level rules
Many no-code and AI app builders connect directly to hosted databases. If row-level security rules are missing or too broad, anyone with the public key can read or modify data.
3. Secrets in the front end
API keys for payment, email or AI providers end up in browser code or public repositories, where they can be copied and abused.
4. Injection flaws
User input is passed into database queries, shell commands or AI prompts without validation.
5. Weak authentication and session handling
Home-made login flows, missing rate limits, insecure password resets and long-lived tokens.
6. Hallucinated or vulnerable dependencies
AI suggests packages that do not exist (which attackers can register) or outdated packages with known vulnerabilities.
7. No logging, backups or monitoring
When something goes wrong, there is no audit trail and no way to recover.
When is vibe coding the right choice?
| Use case | Vibe coding suitable? |
|---|---|
| Clickable prototype to test an idea with users | Yes |
| Internal tool with no sensitive data, used by a small team | Usually, with basic review |
| Landing page or marketing microsite | Usually |
| MVP that stores customer data or takes payments | Only with professional review and hardening |
| Healthcare, finance or regulated data | Not without full engineering, security review and compliance work |
Checklist: taking an AI-built prototype to production
- Threat-model the app. List what data it stores, who should see what, and what an attacker would want.
- Review authorisation on every endpoint. Check ownership and roles server-side for every read and write.
- Lock down the database. Enable row-level security, restrict service keys to the server, and remove public write access.
- Move secrets server-side and rotate any key that has ever been in client code or a public repository.
- Validate all input on the server, including content sent to AI models.
- Audit dependencies. Confirm every package exists, is maintained and is free of known critical vulnerabilities.
- Add rate limiting, logging and alerts on authentication and sensitive actions.
- Run automated security scanning (static analysis, dependency scanning) in your deployment pipeline.
- Get a human code review by an experienced engineer before launch, and a penetration test for high-risk apps.
- Set up backups and an incident plan.
How to use AI coding tools safely in a professional team
- Treat AI output like code from a fast junior developer: useful, but always reviewed.
- Give the tools your security requirements explicitly (authentication approach, data access rules, validation library).
- Keep architecture decisions with experienced engineers; let AI accelerate implementation.
- Require tests, including negative tests ("user A cannot read user B's invoice").
This is how we use AI in our own custom software development work: faster delivery, with the same review and security standards as hand-written code. If you are planning an MVP, our guide to the MVP development timeline shows where review fits in.
Frequently Asked Questions
Is vibe coding safe?
It is safe enough for prototypes and low-risk internal tools. For production apps that store personal data or process payments, research shows most vibe-coded apps contain vulnerabilities, so professional review, testing and security hardening are needed before launch.
Can AI find the security problems in AI-generated code?
AI-assisted scanners can help catch some issues, and better prompts reduce risk, but the 2026 research found these measures do not eliminate vulnerabilities. Combine automated scanning with human review of access control and data handling.
What is the most common vulnerability in AI-built apps?
Broken access control, where the app fails to check whether a logged-in user is allowed to access a specific record. It was the most frequent critical category in the June 2026 audit of vibe-coded applications.
Should startups stop using AI coding tools?
No. AI tools make teams significantly faster. The goal is to keep the speed while adding the engineering practices that make software secure: threat modelling, server-side authorisation, dependency checks, testing and review.
How much does it cost to secure a vibe-coded app?
It depends on the app's size and how much data and payment handling it includes. A focused security review and hardening of a small app is a fraction of the cost of a rebuild, and far cheaper than a data breach.
Turn your prototype into production-ready software
We review, secure and scale AI-built prototypes, or rebuild them properly when that is the better option. Book a free software consultation and we will assess your app.
Sources
- Deng, Fan and Meng, "Understanding the (In)Security of Vibe-Coded Applications," arXiv:2606.23130 (June 2026): arxiv.org
- Cloud Security Alliance, "Vibe Coding's Security Debt: The AI-Generated CVE Surge" (2026): labs.cloudsecurityalliance.org
- Wikipedia, "Vibe coding": en.wikipedia.org
- OWASP Top 10 web application security risks: owasp.org
