Vibe coding has changed how quickly we build software. The problem is that it can also change how quickly we create security vulnerabilities.

There is something almost magical about vibe coding. You describe what you want like “Build me a dashboard with authentication, a database, charts, payments, and an admin panel.”

A few minutes later, there is an application running in your browser.

  • You tweak the prompt. The UI changes.

  • You ask for authentication. It adds authentication.

  • You ask for a database. It creates tables.

  • You ask for an API. It writes one.

And suddenly, you are no longer thinking like a programmer. You are thinking like a product builder. That is exactly why vibe coding is so exciting.

But there is a problem.

The easier it becomes to create software, the easier it becomes to create software that nobody has properly secured.

And this is where I think the conversation around vibe coding is missing the most important part.

We talk about:

  • How fast AI can build applications

  • How non-developers can create software

  • How much code AI can generate

  • How much time developers can save

  • How “programming” is becoming prompting

But we don’t talk enough about what happens when the person creating the application doesn’t know what the generated code is actually doing.

Because the application can look perfect, the UI can look professional, login screen can look secure, database can contain real data or API can return JSON.

The application can pass a demo and still be completely broken from a security perspective.

The dangerous part of vibe coding isn’t that AI writes bad code.

It is that AI can write convincing code that looks correct enough that humans stop questioning it.

The Vibe Coding Revolution

The term vibe coding became popular because it describes a fundamentally different way of building software.

Instead of writing:

const users = await db.user.findMany({
  where: {
    organizationId: user.organizationId
  }
});

You might simply tell an AI coding tool:

❝

“Show the current user’s organization’s users in the admin dashboard.”

The AI figures out the implementation. Tools such as Claude Code, Cursor, Lovable, Bolt, v0 and similar systems have made this workflow increasingly powerful.

For prototypes, internal tools and even production applications, this can be incredibly productive and I’m not against it.

Quite the opposite.

Vibe coding is one of the most interesting changes to software development in years.

The problem starts when we confuse “The application works.” with “The application is secure.”

Those are two completely different statements.

The First Danger: The UI Is Not Your Security Boundary

Let me start with something I have personally seen. Imagine a job listing displaying Salary Not Disclosed

Looks fine and the user cannot see the salary.

But open DevTools. Go to Network → API request → Response

And suddenly:

{
  "salaryDetail": {
    "minimumSalary": 1100000,
    "maximumSalary": 1500000
  },
  "hideSalary": true
}

The UI says Salary not disclosed and the API says Here is the salary.

That isn’t security, that’s UI hiding.

A similar case was publicly reported involving Naukri, where salary information was reportedly present in an API response despite the UI displaying the salary as undisclosed. The issue was subsequently fixed so that the sensitive salary values were no longer exposed to the browser.

The engineering lesson is much bigger than the specific website.

If the browser receives the data, the user has the data.

It doesn’t matter whether you:

  • hide the <div>

  • use CSS display: none

  • blur the value

  • conditionally render it

  • hide it behind a button

  • obfuscate it with JavaScript

If the sensitive value is already inside the browser’s response It isn’t secret anymore.

The Appraisal Example Is Even More Serious

I have seen another version of the same problem inside Finance Product delivered to a company.

Before the official appraisal announcement, employees weren’t supposed to know their appraisal percentage.

The UI didn’t show it, everything looked normal. But someone inspected the application’s network requests.

The API response contained information related to:

  • appraisal percentage

  • current salary

  • salary change

The information was already being delivered to the client. The UI was simply choosing not to display it. Think about what happened here.

The frontend developer may have thought “The employee can’t see the appraisal percentage.” but the backend had effectively said “Here you go. I’m sending it anyway.”

This is one of the oldest lessons in web security Frontend code is not a trusted environment.

Anything delivered to the browser should be considered potentially accessible to the person controlling that browser.

This isn’t even specifically a vibe-coding problem. In fact, your first two examples are important precisely because they happened in conventional software systems.

And that’s the point.

Vibe coding doesn’t invent these mistakes. It can dramatically increase the number of people capable of making them.

Now Add AI to the Equation

This is where things become interesting. A traditional development team might have:

  • frontend engineers

  • backend engineers

  • security engineers

  • QA engineers

  • architects

  • DevOps

  • code reviewers

Now imagine someone building an application using an AI coding agent.

They say:

❝

“Create a login page.”

AI creates one.

❝

“Add an admin dashboard.”

AI creates one.

❝

“Connect Supabase.”

AI creates the database integration.

❝

“Add role-based access.”

AI adds some conditional rendering.

The developer sees:

Admin Dashboard

when they are an admin.

And:

Access Denied

when they aren’t. Looks secure. But what happens if the authorization exists only here?

if (user.role === "admin") {
  return <AdminDashboard />;
}

That is not authorization. That is rendering logic.

A malicious user could potentially bypass the UI and call the underlying API directly.

The backend needs to enforce:

Is this user authenticated?
        ↓
Who is this user?
        ↓
What organization do they belong to?
        ↓
What role do they have?
        ↓
Are they allowed to access THIS resource?
        ↓
Only then return the data.

The browser should never be the final authority.

The Real Vibe-Coding Security Problem

The biggest problem isn’t simply:

❝

“AI makes mistakes.”

Humans make mistakes too. The deeper problem is scale.

Before AI:

❝

One developer might write 500 lines of code in a 1 or 1/2 day

With AI:

❝

One developer might generate 5,000 lines before lunch.

And now imagine the developer doesn’t deeply understand all 5,000 lines.

That’s where the risk changes.

AI doesn’t just accelerate development. It accelerates the production of both good code and bad code.

Research from Wiz found recurring security problems in vibe-coded applications, including client-side authentication, exposed API keys, overly permissive database access and sensitive applications without adequate authentication.

Veracode’s 2025 GenAI Code Security Report similarly concluded that LLM-generated code continues to introduce security vulnerabilities at concerning rates even as models become better at producing functionally correct software.

That’s the distinction developers need to understand:

Functional correctness ≠ security correctness.

An AI can produce:

npm run build
✓ compiled successfully

while your application is leaking:

API keys
user records
internal documents
database credentials
PII
authorization information

Real-World Example #1: Secrets Sitting in the Frontend

One of the easiest mistakes for AI-generated applications is putting secrets into frontend code.

For example:

const OPENAI_API_KEY = "sk-...";

Or:

NEXT_PUBLIC_OPENAI_API_KEY=...

The second example is particularly dangerous because NEXT_PUBLIC_ variables in Next.js are intentionally exposed to the browser.

Once bundled into frontend JavaScript, the secret isn’t a secret anymore.

A user can inspect:

View Source
→ JavaScript bundle
→ Search "sk-"

And potentially find it.

Vercel has explicitly highlighted exposed secrets as a recurring problem in AI-generated applications and reported blocking large numbers of insecure deployments involving exposed credentials.

The correct architecture is:

Browser
   │
   │ request
   ▼
Your Backend
   │
   │ secret API key
   ▼
OpenAI / Gemini / Claude / Stripe

Not:

Browser
   │
   │ SECRET API KEY 😬
   ▼
OpenAI

Real-World Example #2: A Vibe-Coded App Exposed 18,000 Users

This isn’t hypothetical.

In February 2026, The Register reported on research involving a Lovable-hosted application where a researcher claimed to have found 16 vulnerabilities, including six classified as critical, with the application exposing data associated with more than 18,000 users.

The important detail isn’t the platform, it’s the pattern.

AI makes it incredibly easy to connect:

Frontend
   ↓
Authentication
   ↓
Supabase
   ↓
PostgreSQL
   ↓
File storage

But making those pieces work doesn’t automatically mean:

Authentication
      +
Authorization
      +
Row-Level Security
      +
Correct database policies
      +
Secure storage rules
      +
API validation

have been implemented correctly. That’s where experienced engineering still matters.

Real-World Example #3: Base44 Authentication Bypass

Another excellent example came from Wiz research into Base44, an AI-powered/vibe-coding platform.

Wiz discovered a vulnerability that allowed unauthorized users to access applications intended to be private.

The attack involved undocumented registration and verification endpoints that could be abused using an application’s non-secret app_id.

The result?

An attacker could bypass intended authentication controls, including SSO, and access private applications.

Wiz reported that the affected applications included enterprise use cases involving:

  • internal chatbots

  • knowledge bases

  • HR operations

  • PII

The issue was reportedly fixed in less than 24 hours, and the company said it found no evidence of exploitation.

This is the scary part.

The vulnerability wasn’t some Hollywood-style zero-day. It was fundamentally an authorization and authentication design problem.

And AI-powered development platforms can make these kinds of mistakes much easier to reproduce at scale.

The Claude Incident Changes the Conversation

Now let’s move from vibe-coded applications to something even more uncomfortable.

Anthropic’s Claude, A tool used by developers, engineers, researchers, companies and professionals around the world.

In July 2026, users discovered that publicly shared Claude conversations and Artifacts could appear in Google search results.

A simple search operator such as:

site:claude.ai/share

could surface shared conversations.

Reports described exposed material ranging from programming discussions and work notes to highly sensitive information, including medical documents, company information, personal details and, in some cases, credentials or keys.

And Artifacts were part of the story too.

Published Claude Artifacts, documents, apps and interactive creations were also discoverable through search.

Anthropic’s position was that users had deliberately created public share links, and those links were intended to be publicly accessible.

That’s an important distinction.

This wasn’t a claim that private, unshared Claude conversations were dumped from Anthropic’s database.

The issue was that content users had shared publicly could become discoverable through search engines in ways many users apparently didn’t expect.

And that’s exactly why this incident matters.

💡 Enjoying this article?
Every week day, I publish practical, production-ready deep dives covering Web development, System Design, Open source projects, Tech industry trends and AI Engineering and tools.

This is an important security lesson. Developers sometimes think:

❝

“It’s not indexed. Nobody knows the URL.”

That’s called security through obscurity. It can be useful as an additional layer. It should never be the security boundary.

A public URL can be:

  • crawled

  • copied

  • logged

  • leaked

  • posted

  • indexed

  • archived

  • shared in a Slack channel

  • included in a GitHub issue

  • captured by browser history

And once it’s public you no longer control where it goes.

Anthropic’s own documentation says that shared Claude chats can be viewed by anyone with the share link.

The July 2026 incident simply demonstrated how dramatically the audience can expand when search engines discover those links. TechCrunch reported that Google results later stopped returning the affected conversations, although Artifacts had remained discoverable for a period.

And This Is Where Vibe Coding Gets Really Interesting

Imagine a developer building an internal company application with Claude.

They paste:

Our production architecture:
DB password: ...
AWS credentials: ...
Customer API response: ...
Internal employee data: ...

Then they ask:

❝

“Build me an admin dashboard using this data.”

  • Claude generates an Artifact.

  • The developer publishes it.

  • The application works beautifully.

  • They send the link to a colleague.

  • Everything seems fine.

Except now the artifact may contain information that was never supposed to become public. The problem isn’t that AI deliberately leaked the information.

The problem is that the developer never treated the generated artifact as a potentially public web resource.

That’s a very different mindset from traditional development.

The Most Dangerous Sentence in Vibe Coding

There is one sentence I increasingly worry about:

❝

“It works.”

Because “it works” can hide:

Authentication bypass
Authorization bugs
Exposed secrets
SQL injection
XSS
CSRF
IDOR
Weak database rules
Public storage buckets
Sensitive logs
Leaked API responses
Missing rate limits
Prompt injection
Unsafe AI tool permissions

The application can work perfectly and still be vulnerable.

Vibe Coding Creates a New Security Asymmetry

Traditional software development had a natural bottleneck. Writing software was hard. That forced people to understand at least some of what they were building.

AI removes that bottleneck.

Now:

Idea
 ↓
Prompt
 ↓
Code
 ↓
Deploy

can happen incredibly quickly. That’s fantastic for innovation. But security reviews haven’t become 100× faster.

So we get:

Code generation ↑↑↑↑↑
Application count ↑↑↑↑↑
Attack surface ↑↑↑↑↑

Security expertise → comparatively limited
Security review → comparatively slow

This is the real danger.

We’re increasing the supply of software faster than we’re increasing the supply of people who know how to secure it.

What Developers Should Do Instead

I’m not saying “Stop vibe coding”, that would be ridiculous. Instead Vibe code aggressively but security-review deliberately. Here is the workflow I recommend.

1. Treat Every AI-Generated Line as Untrusted

Don’t assume:

❝

“Claude generated it, therefore it’s correct.”

Instead ask:

❝

“What assumptions did this code make?”

Especially around:

  • authentication

  • authorization

  • database queries

  • file uploads

  • payments

  • secrets

  • API calls

  • user input

  • admin operations

2. Never Put Secrets in Client Code

This should be non-negotiable.

Bad:

const apiKey = "secret";

Bad:

NEXT_PUBLIC_DATABASE_PASSWORD=...

Good:

Frontend
   ↓
Backend API
   ↓
Secret manager
   ↓
Third-party API

Your browser is hostile territory. Treat it that way.

3. Test the API, Not Just the UI

This is exactly where the Naukri and appraisal examples become useful.

Don’t test:

❝

“Can the user see the salary?”

Test:

❝

“Does the API return the salary to an unauthorized user?”

Don’t test:

❝

“Does the employee see the appraisal percentage?”

Test:

❝

“Can an employee retrieve another employee’s appraisal data by manipulating the API request?”

The security question is always Can I access data I shouldn’t have access to?

4. Check the Network Tab

For every sensitive feature, inspect:

Request
Response
Headers
Cookies
Payload
Status code

Ask:

  • Is sensitive data being returned?

  • Are authorization decisions server-side?

  • Are IDs predictable?

  • Can I change the user ID?

  • Can I access another organization’s records?

  • Are secrets returned?

  • Are internal fields exposed?

Your browser’s Network tab is one of the best security debugging tools you already have.

5. Verify Database Security

If you’re using Supabase, Firebase, MongoDB, PostgreSQL or another backend:

Don’t stop at “The connection works”. Ask:

Who can SELECT?
Who can INSERT?
Who can UPDATE?
Who can DELETE?
Can user A access user B's data?
Can organization A access organization B's data?
Are storage files protected?
Are Row-Level Security policies enabled?

Wiz found overly permissive or missing database access controls among recurring risks in vibe-coded applications.

6. Ask AI to Attack Its Own Code

This is one of the most useful changes you can make.

Don’t only ask:

❝

“Build this feature.”

After it is complete, ask:

❝

“Act as an application security engineer. Try to break this application. Identify authentication bypasses, authorization flaws, IDOR, exposed secrets, injection vulnerabilities, insecure API responses, database permission issues, XSS, CSRF, rate-limit issues and sensitive-data exposure.”

Then ask:

❝

“Show me how each vulnerability could be exploited and how to fix it.”

You’re turning the AI from:

Code generator

into:

Code generator
+
Security reviewer

It isn’t a replacement for professional security testing. But it is a huge improvement over blindly accepting generated code.

7. Never Paste Production Secrets Into AI Prompts

This deserves its own rule.

Don’t paste:

AWS_SECRET_ACCESS_KEY
Database passwords
JWT signing keys
Stripe secret keys
OpenAI API keys
Customer PII
Employee information
Production logs
Private certificates

into an AI conversation simply because “I need help debugging this.”

Redact first.

Use:

AWS_SECRET_ACCESS_KEY=<REDACTED>
DATABASE_URL=<REDACTED>
USER_EMAIL=<REDACTED>

The AI doesn’t need your real secret to explain the problem.

8. Be Careful With “Publish” and “Share”

This applies not only to Claude.

It applies to:

  • Claude

  • ChatGPT

  • GitHub

  • Google Docs

  • Notion

  • Figma

  • Vercel

  • Cloudflare

  • dashboards

  • logs

  • screenshots

  • AI-generated artifacts

Before clicking Publish ask “Would I be comfortable seeing this on Google?”

If the answer is no Don’t publish it.

The New Developer Skill: Security Thinking

I think this is going to become one of the most important developer skills of the AI era.

You don’t necessarily need to memorize every OWASP vulnerability. But you need to develop the instinct to ask Where is the trust boundary?

For example:

Browser
   ↓
API
   ↓
Service
   ↓
Database

Where is authorization enforced?

Another:

User
   ↓
AI Agent
   ↓
Tool
   ↓
Production Database

What prevents the AI agent from performing an operation it shouldn’t?

Another:

Developer
   ↓
AI Assistant
   ↓
Generated Artifact
   ↓
Public URL
   ↓
Search Engine

Who can see the artifact?

These questions become more important as AI increasingly writes and executes code.

The Future Isn’t “AI Will Replace Developers”

That’s the wrong debate. The more interesting question is:

❝

What happens when one developer can create the output of an entire development team?

Because that changes the economics of software.

One developer can build:

  • the frontend

  • backend

  • database

  • authentication

  • APIs

  • dashboards

  • automation

  • deployment

in dramatically less time.

But the developer also inherits responsibility for all those layers. AI can compress implementation time. It cannot compress accountability.

If your application leaks customer data, saying “Claude wrote that” isn’t going to help.

Vibe Coding Isn’t the Enemy

I actually think vibe coding is fantastic.

  • It lowers the barrier to software creation.

  • It allows developers to experiment faster.

  • It lets product managers prototype.

  • It allows designers to build functional ideas.

  • It lets students create applications they previously couldn’t.

  • It gives experienced developers leverage.

But there is a line we shouldn’t cross. The line is Using AI to write code you don’t understand and deploying it into an environment you don’t know how to secure.

That’s where productivity becomes risk.

The Rule I Would Give Every Developer

If I had to reduce this entire article to one rule, it would be:

❝

Vibe code the implementation. Never vibe code the security model.

Here are the few things you can try:

  • Let AI create the components.

  • Let AI generate the boilerplate.

  • Let AI build the CRUD APIs.

  • Let AI write the tests.

  • Let AI refactor the code.

But you should deliberately review:

Authentication
Authorization
Data access
Secrets
API responses
Database permissions
File storage
Input validation
Third-party integrations
Logging
Deployment configuration

Because those aren’t merely coding details. They define your application’s security boundary.

Final Thought

The most dangerous application isn’t necessarily the one written by a bad developer.

It might be the one that looks incredibly good.

The UI is polished, animations are smooth, authentication screen works, database is connected and deployment is live.

The AI says:

❝

“Everything is ready.”

And nobody asks:

❝

“What can a malicious user see if they don’t use the UI the way we intended?”

That’s the question we need to start asking. Because the future of software development isn’t going to be Humans write code.

It is increasingly going to be Humans describe systems. AI builds them.

And when that happens, the developer’s most valuable skill won’t simply be knowing how to generate code.

It will be knowing where to distrust the code.

The Vibe Coding Security Checklist

Before shipping an AI-generated application, ask:

  • Are authentication decisions enforced on the server?

  • Are authorization checks enforced for every sensitive resource?

  • Can one user access another user’s data by changing an ID?

  • Does the API return information hidden by the UI?

  • Are API keys and secrets completely outside client-side bundles?

  • Are environment variables correctly scoped?

  • Are database permissions and RLS policies configured correctly?

  • Are storage buckets private where required?

  • Is user input validated and sanitized?

  • Are SQL/NoSQL queries protected from injection?

  • Is sensitive information excluded from logs?

  • Are rate limits implemented?

  • Are production secrets excluded from AI prompts?

  • Have AI-generated artifacts been checked for sensitive information?

  • Have public/share links been reviewed?

  • Has someone tried to attack the application instead of merely using it?

If the answer to the last question is no, your application probably hasn’t had a security test.

It has had a demo and those are very different things.

Sources & Further Reading

  • Wiz’s research on common security risks in vibe-coded applications and its findings around client-side authentication, exposed secrets and database access.

  • Wiz’s investigation into the Base44 authentication vulnerability.

  • The Register’s report on vulnerabilities in a Lovable-hosted application affecting more than 18,000 users.

  • Vercel’s analysis of security problems in AI-generated applications.

  • TechCrunch’s reporting on Claude shared chats and Artifacts appearing in Google Search in July 2026.

  • Anthropic’s documentation explaining how Claude shared chats work.

Thank You for Reading!

I hope you found it helpful and informative. If you have any questions or feedback, feel free to leave a comment below. Your support and engagement mean a lot to me.

Happy Coding!

Reply

Avatar

or to participate