Vibe coding builds fast apps. It doesn’t build secure ones.

A smartphone displaying a security lock icon on a wooden desk with a succulent

Researchers built three web applications using Gemini Pro, each with a different level of security instruction, then ran security tests on all three. None of them was safe to deploy.

How the Test Was Structured

The first app had no explicit security requirements. The second had general security instructions, including JWT-based authorization, rate limiting, file-upload validation, CORS, and content security policies. The third had detailed requirements drawn from the OWASP Web Security Testing Guide, plus a second AI-based security review pass.

Each step up produced measurably better results. None crossed the threshold for production readiness.

What Each App Got Wrong

The first application had fundamental flaws: user roles could be manipulated through client-controlled input, users could access other users’ data, and authentication state was stored insecurely. It worked correctly for honest users. Attackers are not honest users.

The second application looked more secure. It implemented several recognized controls. A short security review still found that file-upload validation relied too heavily on filename, size, and MIME-type checks, and a link-preview feature was vulnerable to server-side request forgery.

The third application, with OWASP-guided prompts and a second AI review, was the strongest. It still had CSV injection in an export function, missing rate limiting on several endpoints, and an open redirect vulnerability.

lines of HTML codes

Why AI Misses Security Even When You Ask Nicely

AI coding tools are trained on large bodies of existing code, so they can reproduce established security patterns competently. Ask for rate limiting and you will get rate limiting, on the routes you described as sensitive. The endpoint you did not mention stays unprotected.

The deeper issue is system-level thinking. AI can know that user input should be sanitized without reliably tracing every downstream path where that input could cause harm. Security is not a checklist of individual controls. It requires modeling how a system can be abused as a whole, which is a different kind of reasoning.

The Operator Takeaway

The researchers are clear that this is not an argument against AI-assisted development. The productivity benefits are real. The implication is that AI-generated code should be treated as untrusted by default, going through code analysis, security review, and penetration testing the same way traditionally written code would.

Better prompts help. OWASP-specific guidance produced a better result than generic instructions. But as the test shows, telling an AI to build a secure application is not a security strategy on its own. A human with an adversarial perspective still has to check the work.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo