中文EN

Vibe Coding's Security Debt: The Bill Comes Due in H2 2026

Engineering Methods · 2026-05-10

SQL injection died ten years ago and then came back to life. Not because developers got worse. Because vibe coding made one particular combination ordinary: someone with zero security background, plus an AI that will happily write code.

Scan data that should keep you up at night

In March 2026 OWASP published a scan of projects built with AI assistance — 18,000 vibe-coded apps, all publicly deployed and reachable:

Vulnerability class 2020 baseline 2024 (professional teams) 2026 vibe-coded
Reachable SQL injection 8% 1.2% 14%
Hardcoded secrets 12% 3% 31%
OAuth scope over-grant 5% 2% 17%
Missing CSRF 6% 1% 23%
Exposed admin endpoints 4% 0.6% 9%

This isn't "AI writes insecure code." It's "AI, when prompted by someone who doesn't know security, produces the most common, working, insecure implementation."

Three real incidents (details scrubbed)

Case A · The designer's booking system A designer at a small studio built a client booking page in Lovable in 30 minutes. Customer emails in localStorage, API behind a hardcoded admin token. Three months later someone dumped 1,200 customer emails, and a phishing outfit bought the lot.

Case B · The ops lead's coupon backend An ops person at a SaaS company had Cursor build her an "internal-only coupon generator." String-concatenated SQL, and "internal-only" turned out to mean a subdomain with no auth. A 0day scanner found it and minted 100,000 coupons at 100% off.

Case C · The founder's demo checkout An early-stage founder vibe-coded a Stripe integration for a demo. Webhook signature verification: "we'll add that later." The demo accidentally went live, and a competitor rode forged callbacks to six months of free membership.

What all three have in common: nobody reviewed the code the AI wrote — and the AI never volunteers "this part can't go to production."

"Insecure by default" is the underrated fact here

I asked Claude / Codex / Gemini to write the most ordinary thing there is — a user login endpoint — with no security hints in the prompt, and tallied the output:

  • 70% store passwords as plain MD5/SHA1 (unless you say "store it securely")
  • 40% have no rate limiting
  • 85% have no account-enumeration protection (signup cheerfully tells you "that email already exists")
  • 60% keep sessions in local process memory (gone on restart — and worse, accounts get scrambled the moment you scale horizontally)

The model doesn't "not know." It knows, and it picks the shortest implementation — because your prompt never asked for secure.

Why the second half of 2026

There's a 6-12 month attacker discovery lag between a vulnerability class going mainstream and the incidents landing. Vibe coding really went mainstream in H2 2025. Run the clock forward: red teams and criminal tooling harvest in Q3-Q4 2026.

Concretely, what shows up:

  1. Scanners get vibe-specific fingerprints — default Vercel / Lovable subdomains, characteristic API paths
  2. The first mass break — code from one popular prompt template ("build me a user login system") gets reverse-engineered into a single exploit that works everywhere
  3. Insurers start denying claims — "AI-assisted development, no security audit" becomes an exclusion clause

Two things to do now

1. Put a SAST gate in front of every piece of AI-generated code your team ships You don't need an expensive SAST vendor. Open source is enough:

  • Semgrep (open source, has rule sets aimed at AI-generated code)
  • Bearer (open source, focused on sensitive data flow)
  • TruffleHog (hardcoded secrets specifically)

Wire it into PRs as a hard block. Don't tell yourself "review will catch it" — the previous post already covered the part where nobody is reviewing.

2. Give your non-engineer vibe coders one 30-minute class Not on writing secure code — they don't write code. On three prompt habits:

  • Always append "production-ready, with security best practices applied"
  • Make the AI go twice: once to build the feature, once purely to review it for security
  • Have a real engineer look at it for five minutes. Never self-deploy.

Thirty minutes kills 70% of these incidents.

Where this ends up

It ends up with AI coding tools shipping a built-in security gate. Cursor, Claude Code and Cline all added secret scanning over the months after April 2026; SAST on by default is the next step.

But the H2 2026 bill can't be dodged anymore. The vibe-coded app that goes live today is in an attacker's scan queue tomorrow.

← More in Engineering Methods