The Dos and Dont’s of Vibe Coding: AI Security Risks Every Developer Must Know

AI-generated code is accelerating software development at unprecedented speed, but the security consequences are beginning to surface. From Lovable’s 48-day exposure to Moltbook’s publicly accessible database and Vercel’s third-party AI breach, April 2026 revealed how quickly vibe coding can become a security liability when automation outruns oversight.

Nobody talks about the moment the CEO deleted his entire codebase. He was building fast, using an AI agent to ship a product without writing a single line himself. One misunderstood prompt later, the AI wiped everything. That was 2025. A year later, the cautionary tales are no longer quiet.

In April 2026, three major incidents hit the Vibe coding world in a single week: Lovable exposed user credentials for 48 days. Moltbook was breached 72 hours after launch. Vercel was compromised through a third-party AI tool. The Challenger disaster analogy is not hyperbole. It is a prediction about what happens when velocity consistently outpaces review.

What Is Vibe Coding?

Vibe coding was coined by Andrej Karpathy, AI researcher and OpenAI founding member, in February 2025. The idea is to describe what you want in plain English, let the AI translate your intent into working software, and ship. Unlike autocomplete tools, vibe coding platforms generate entire application architectures from a single prompt, frontend, backend, database schema, and deployment configuration. The developer’s role shifts from writing syntax to describing intent.

Collins English Dictionary named it Word of the Year for 2025. Gartner forecasts that 60% of all new code will be AI-generated by the end of 2026. But 2025 was also the year of the vibe hangover; organisations that rushed to replace engineers with prompts ran into hard constraints around security and architectural integrity. What 2026 brought was data. And the data is sobering.

The Numbers

These are not projections. They are Q1 2026 measurements:

91.5% 

The vibe-coded apps contained at least one vulnerability related to AI hallucinations.

2.74×

More flaws in AI-generated code vs. human-written code (470 GitHub PRs).

40–62%

AI-generated code contains security vulnerabilities across major models.

96%

The developers don’t fully trust AI-generated code, but only 48% always review it.

48 days 

Lovable’s BOLA vulnerability ran undetected before disclosure.

“Ninety-six percent don’t trust it. Forty-eight percent review it. The gap in between is where breaches live.”

The Incidents That Changed the Conversation

Three major security incidents hit the Vibe coding world in a single week in April 2026. Each one exposed a different failure mode. Together, they made the same argument: the speed of vibe coding had outrun the industry’s ability to govern it.

Lovable

The vibe coding platform, valued at $6.6 billion, with eight million users and enterprise clients including Uber, Zendesk, and Deutsche Telekom, exposed source code, database credentials, AI chat histories, and personal data for projects created before November 2025. The exposure lasted 48 days. A security researcher needed just five API calls from a free account to access another user’s credentials and source code in full.

The vulnerability was a Broken Object Level Authorisation (BOLA) flaw, a well-understood class of bug that allows one user to access another’s data by manipulating API references. It was reported through HackerOne, the industry’s standard bug bounty platform. The report was closed without escalation. Lovable’s initial response called it “intentional behaviour” and blamed documentation. Then it blamed HackerOne. Eventually, the CEO issued a public apology: “I take accountability.” The real lesson buried beneath the PR damage control: 70% of apps on Lovable’s platform had Row Level Security disabled. That’s not a bug. That’s a design philosophy, and it applies across the industry.

Moltbook

It is a social networking site built entirely through vibe coding. Its founder publicly stated he “didn’t write one line of code”, a badge of honour in the Vibe coding community. The site launched. Three days later, security firm Wiz found a misconfigured database with full read and write access exposed to the open internet. No authentication. No access controls. 1.5 million authentication tokens and 35,000 email addresses were sitting there, readable by anyone who looked.

The root cause was straightforward: the AI agent scaffolded the database for functionality and said nothing about permissions. It built the house and left the front door open. Nobody on the team reviewed the database configuration before deployment, because the AI had generated it and it appeared to work. The site functioned. It was also a live data breach from the moment it went online.

Vercel

It was compromised not through its own code, but through Context.ai, a third-party AI evaluation tool that had been granted production-level access to Vercel’s infrastructure. Attackers used Context.ai as the entry point and extracted $2 million worth of data. A separate “Agent Commander” attack, demonstrated in March, showed that prompt injection into AI coding agents could convert autonomous tools into remotely controlled malware-delivery platforms.

The Vercel incident introduced a threat model that most organisations hadn’t accounted for: the AI tools themselves are attack surfaces. Every evaluation plugin, agent framework, and coding assistant connected to your systems is a potential entry point. The attack didn’t exploit a vulnerability in Vercel’s code. It exploited the trust relationship between Vercel and a tool it had granted production access to, exactly the kind of implicit trust that vibe coding encourages developers to extend to AI systems by default.

Figure 1: Three breaches. Three different failures. One warning the AI industry can no longer ignore: when speed outruns security, the consequences stop being theoretical.

The Dos

  • Prototype first. Use vibe coding for MVPs and internal tools before touching production data or regulated systems.
  • Prompt for security upfront. Include secure-coding directives in your first message, not as a deployment gate.
  • Treat every output as untrusted code. Review it the way you’d review a PR from an external contractor you’ve never met.
  • Run automated security scans. SAST, secrets detection, and dependency scanning as pre-commit gates, not afterthoughts.
  • Require genuine human sign-off. Someone who understands what the code is doing, not just that it runs, but reviews before it ships.

The Dont’s

  • Assume ‘it works’ means ‘it’s secure.’ Moltbook’s database worked perfectly. It was also completely open to the internet.
  • Hardcode credentials. AI routinely embeds API keys inline. Add .env to .gitignore before your first commit.
  • Skip row-level security. The AI doesn’t ask whether it’s acceptable. Neither will your users, until they’re inside someone else’s data.
  • Accept library choices without checking. Vibe tools pull in third-party packages without reviewing CVEs or maintenance status.
  • Let the same AI generate and review its own code. Separation of duties applies even in AI-assisted workflows.
  • Grant third-party AI tools production-level access without controls. The Vercel breach didn’t come from Vercel’s code.

“The era of the mega prompt is over. The era of strategic decomposition has arrived.” — Keywords Studios, 2026

Conclusion: Speed Is Not the Problem

Software development has always involved a tension between moving fast and building things that last. Vibe coding compressed that tension into a single prompt. The speed was real, the productivity gains were documented, and then April 2026 happened: three incidents in one week, a $6.6 billion platform exposed for 48 days, a social network breached in 72 hours, a developer tool turned into a $2 million entry point.

Karpathy had already moved on by February 2026, calling vibe coding “pasé” and proposing agentic engineering: AI handles implementation while humans provide architecture and review. The tools are not going away. The developers who will thrive are those who use them deliberately, not as a shortcut past the hard parts of software engineering, but as an accelerant that still demands human judgment, security review, and accountability at every meaningful checkpoint.

The AI can write the code. But when the breach happens, the data leaks, or the system fails at scale, then who is actually responsible?

Share your love
Keerthana Srinivas
Keerthana Srinivas
Articles: 57

Leave a Reply

Your email address will not be published. Required fields are marked *