I Looked at How Vibe-Coded Apps Get Built — Here's the Security Pattern That Keeps Showing Up

Check your own app — free, in about a minute.

The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.

Run the free mini-scan →

I Looked at How Vibe-Coded Apps Get Built — Here's the Security Pattern That Keeps Showing Up

An educational breakdown of the vulnerability patterns that recur in AI-generated code. The examples below are illustrative composites based on well-documented vulnerability classes — not results from any specific scan.

Spend enough time reading AI-generated code and you start seeing the same shapes repeat. Not the same bugs copy-pasted — the same decisions. The AI makes reasonable-sounding choices that a security-minded developer would flag instantly, and it makes them over and over, across frameworks, languages, and app types.

What follows is a walkthrough of the patterns, why the AI keeps producing them, and what each one looks like when it meets the real world. If you're shipping something an AI helped build, you'll probably recognize at least two of these.

Pattern 1: The Helpful Assistant That Trusts Everyone

Ask an AI to "add a user profile page" and you'll get a profile page. Ask it to "let users edit other users' profiles if they're admins" and you'll get a role check — maybe. What you almost never get unprompted is the paranoid version: verify on every request, on the server, that this specific user is allowed to do this specific thing to this specific record.

The pattern: authorization is treated as a UI concern. The AI builds the admin panel, the edit buttons, the "only show this to owners" logic — all in the frontend. The backend cheerfully serves anyone who asks.

Illustrative example: a project-management app where the frontend hides the "Delete Project" button from non-owners, but DELETE /api/projects/8472 works for any authenticated user. The AI wasn't being lazy — from its perspective, the feature was complete. Access control as a data-layer rule simply wasn't in the request.

Why it recurs: Natural-language prompts describe visible behavior ("admins can delete projects"). They rarely describe invisible invariants ("the server must reject unauthorized deletes"). The AI builds what you described.

Pattern 2: Secrets Treated Like Configuration

When you tell an AI "integrate Stripe," the fastest working implementation puts the key where the code can reach it. In a vibe-coded app, "where the code can reach it" is often the frontend bundle, a committed config file, or a hardcoded string — because the AI wasn't asked to think about who else can reach it.

The pattern: credentials are handled for convenience, not for secrecy. You'll find API keys in JavaScript bundles, database URLs in committed files, webhook secrets in client-side code.

Illustrative example: a SaaS starter where the OpenAI API key sits in a config.js file shipped to every visitor. The developer never typed the key into frontend code — the AI scaffolded it there, and the app worked perfectly, so nobody questioned it.

Why it recurs: Secret management is pure overhead from the AI's perspective. It doesn't make the demo work better. It requires infrastructure (env vars, server-side proxies) that the prompt didn't mention. So it gets skipped, silently.

Pattern 3: Input Handling That Assumes Good Faith

AI-generated forms validate for correctness — is this a valid email, is the date in the right format — but rarely for hostility. The model writes the validation a helpful developer would write for legitimate users, not the adversarial filtering a security review would demand.

The pattern: user input flows into queries, HTML, and system calls with only cosmetic validation.

Illustrative example: a recipe-sharing app where the "ingredients" field renders with innerHTML for nice formatting. A user submits an ingredient containing a script tag. Every visitor who views that recipe now runs the attacker's JavaScript. The AI used innerHTML because it renders rich text beautifully — the security implication never entered the picture.

Why it recurs: The training data is full of innerHTML examples, string-concatenated queries, and "quick" implementations. The AI reproduces the common pattern, and the common pattern is insecure.

Pattern 4: The Demo That Became Production

This one isn't a code pattern — it's a lifecycle pattern. AI tools make it so fast to go from idea to working app that the "development" phase collapses. There's no staging environment, no code review, no hardening sprint. The thing you built on Tuesday to show a friend is taking real user signups on Thursday.

The pattern: debug artifacts ship. Verbose error pages, test endpoints, console logging of internal state, TODO: add auth here comments sitting above unprotected routes.

Illustrative example: a booking app with a /api/debug/users endpoint that dumps the user table. It was scaffolding the AI added during development. It worked, it was useful during testing, and nobody removed it — because "removing debug code" was never anyone's task.

Why it recurs: There's no team, no review process, no checklist. In traditional development, multiple humans touch code before production. In vibe coding, it's you and the AI, and neither of you is playing the skeptic.

Pattern 5: Copy-Paste Security Theater

Sometimes the AI does add security — and gets it subtly wrong in ways that look right. Rate limiting that's trivially bypassed. CORS configured but set to *. Password hashing with a fast hash. An auth check on 9 of 10 routes.

The pattern: security measures that exist but don't actually protect. These are the most dangerous because they create false confidence. You checked the box. The box is empty.

Illustrative example: an app whose login rate-limits by IP address — but sits behind no proxy handling, so every request arrives from the same internal IP and the limiter either blocks everyone or (more commonly) was "temporarily" disabled during testing and never re-enabled.

Why it recurs: Security is a system property, not a feature. Adding a rate-limiting library isn't the same as having rate limiting. The AI adds the component; making it actually work requires understanding the deployment, which the AI doesn't have.

What Ties It All Together

Every pattern above has the same root cause: the AI optimizes for the request, and the request never mentions security. Not because builders don't care, but because "make it secure" is too vague to act on, and the specific threats are things you only learn by getting burned or studying.

The good news: these are all known vulnerability classes with known fixes. SQL injection, XSS, IDOR, exposed secrets — the industry solved these years ago. The problem isn't novel attacks. It's that the speed of AI-assisted building skipped the step where someone checks.

The Fix Is a Second Pair of Eyes

You don't need to become a security researcher. You need what every professional team has: someone who looks at the app like an attacker before it goes live.

That's what PreShipIt does. Paste your app's URL, and it probes your app the way an attacker would — then hands you a plain-English report of what to fix, prioritized by what actually matters.

$29, one-time. No subscription. Get your pre-ship inspection at preshipit.com

The PreShipIt Brief — a short weekly email for people shipping vibe-coded apps: the week's important vulnerabilities and launch-safety checks, in plain English.

New and free. Double opt-in: we email you a confirmation link before anything else arrives. Unsubscribe any time.

Check your own app — free, in about a minute.

The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.

Run the free mini-scan →

← Back home · Run a free mini-scan · Scan my app — $29 · See a sample report