Back to Blog

Vibe Coding Security Top 10

Author

Joey Rideout

March 27, 2025 · 8 min read

Vibe Coding Security Top 10

I have been watching intently this month as X users post horror stories of security vulnerabilities in applications written primarily with AI tools like Cursor, also known as "vibe coding".

Since novice programmers probably haven't heard of the OWASP Top 10, and vibe coding is quickly turning into its own can of worms, I thought I would take a stab at defining a "Vibe Coding Top 10", or the 10 most common vulnerabilities introduced by vibe coding.

1. Insufficient Rate Limiting

Most issues I have seen arise in vibe-coded applications have to do with rate limiting - either external API calls, like OpenAI or Anthropic LLM APIs, or internal APIs that are vulnerable to denial of service. Even if a denial of service attack doesn't bring down your app, excessive infrastructure expenses or API charges can bankrupt you.

Prompt to fix it:

I am deploying my app on [PLATFORM NAME] and my app calls [PREMIUM API NAME(s)]. Search my codebase for endpoints that are not rate limited, and tell me how I can protect myself from excessive traffic or API charges on my chosen platform/APIs

Bonus tip: Put your app behind CloudFlare, even if you are already using an Infrastructure-as-a-Service (IaaS) like Vercel.

2. Missing Access Control

Unlike the OWASP Top 10's Broken Access Control, vibe coded applications often simply don't have any access control. This commonly manifests in the form of unauthenticated API endpoints, or application pages that can be viewed by unathenticated visitors.

Prompt to fix it:

Search my codebase for unauthenticated endpoints, and make sure the application always verifies authentication and authorization of the user on logged-in portions of my app.

3. Insufficient Spam Protection

Similar to item #1 on this list, not protecting against automated sign-ups and user actions is a common pitfall. If your app provides a free tier or allows even rate-limited access to a third-party AI tool, bot accounts can swarm your infrastructure and rack up charges. Depending on your application, bots can of course wreak havoc in other ways: spam, malware, unsanctioned penetration testing... you get the idea.

Prompt to fix it:

Add a Captcha to my sign-up flow, or tell me how to implement CloudFlare's or [PLATFORM NAME]'s

4. Direct Database Access

No, I'm not talking about Direct Object Access, although that is still a consideration. I am talking about entire databases being exposed through an API endpoint with queries being written by the front-end and sent over HTTP to an eagerly-waiting database service. This "design" pattern, if you can call it that, has a host of problems that overlap with all of the above items on this list.

Prompt to fix it:

Make sure the database is only accessible through rate-limited and authenticated server functions and not exposed directly on any API endpoint.

5. Exposed Keys

A common issue with vibe coding is exposing API keys, database credentials, and other sensitive tokens in client-side code or public repositories. These exposed credentials can be easily harvested by attackers and used to access your services or data.

Prompt to fix it:

Review my codebase for any hardcoded credentials, API keys, or tokens. Help me implement environment variables and secret management best practices for my platform.

6. Input Validation

AI-generated code often lacks proper input validation, allowing attackers to send malicious data that can lead to SQL injection, XSS, and other common vulnerabilities. Vibe coded applications typically focus on the "happy path" and neglect edge cases.

Prompt to fix it:

Review all user input fields in my application and implement proper validation and sanitization to prevent injection attacks and data corruption.

7. No Size Limits

Any application accepting user files, or text for that matter, should have size/length limits on the content being uploaded by the user. Cloud storage isn't that cheap, and databases can become bogged down with massive text fields.

Prompt to fix it:

Make sure all user-supplied inputs and file uploads have length/size limits enforced by the server.

8. Insecure Dependency Management

Using Cursor myself, I routinely see the AI try to fix package-related errors by downgrading a package several major versions "for compatibility". Left unchecked, this approach can introduce outdated and vulnerable packages to your project.

Prompt to fix it:

Audit my dependencies for security vulnerabilities and recommend alternatives for any packages that are outdated or have known security issues.

9. No Cloud Spending Limits

If rate limiting and spam prevention weren't enough, real authentic users may be spamming your new AI chatbot app with hundreds of requests. You could even be eating through bandwidth by serving uncached large images without a CDN.

Prompt to fix it:

I am deploying on [PLATFORM NAME], walk me through setting up spending limits for bandwidth and other costs.

10. No Source Control

Countless "Vibe Coders" have had to start over because the AI decides to delete half of their code or irreparably break it.

Prompt to fix it:

I am using [IDE NAME]. Teach me how to use Git and routinely push code to GitHub.

11. (BONUS): Not using vibesecurity.io

Look, I am a fan of Vibe Coding. I do it myself within reason. I have also been in cybersecurity for over a decade, and I know how hard it is to train professional Software Developers to write secure code, let alone beginners churning out thousands of AI-generated lines. But I've got your back. I am creating a tool called Vibe Security that plugs into your GitHub repo (you have one now, right?) and monitors your code for security issues. Join below.

Want to Learn More?

Get early access to Vibe Security's AI-powered vulnerability scanner and protect your code from these critical security threats. Join our waitlist today.