External Attack Surface Management
Vibe Coding Security Risks: What AI-Built Apps Leave on Your Attack Surface
Hitesh Mittal, Cyber Threat Analyst, Styx Intelligence · · 10 min read

Key Takeaways
- Most exposure takes no hacking. Secrets, customer records and maps of the backend often sit in the JavaScript every visitor downloads.
- AI writes working code, not necessarily secure code. In Veracode's 2025 testing of 100+ models, generated code introduced OWASP Top 10 vulnerabilities in 45% of cases.
- This is more than a developer problem. Many vibe-coded apps are built by non-engineering teams, hosted on third-party platforms and missing from the asset inventory.
- Attackers can find these apps cheaply and at scale. Reading public code, scanning it for secrets and searching across the web is easy to automate.
- You can find them first. Inventory domains tied to your brand, read your own shipped code like an outsider, test access rules and monitor for leaked credentials.
Vibe coding security risks are the vulnerabilities that come from shipping AI-generated apps without security review. The most common are API keys and real customer data exposed in public JavaScript, access checks enforced in the browser instead of on the server, and backend databases left open to anyone. Because many of these apps are built outside engineering, security teams often don't know they exist.
Somewhere in your company, someone has probably shipped an AI-built app that security has never reviewed. Its code is public, and anyone who downloads it can read what's inside. Vibe coding, building software by describing it to an AI assistant and shipping what comes back, is a genuine leap in productivity. It is also reviving security mistakes the industry thought it had left behind, and the people who inherit that risk are security leaders and lean teams who never wrote the code.
What are the security risks of vibe coding?
The AI doesn't write bad code. It writes plausible, working code. The risk sits in what fast, prompt-driven building skips and in the defaults it inherits. Independent testing backs this up: in Veracode's 2025 study of more than 100 large language models, generated code introduced OWASP Top 10 vulnerabilities in 45 percent of test cases (Veracode, July 2025).
In the applications we review, the same six patterns come up again and again.
| Risk | What it looks like | Why this impacts security teams |
|---|---|---|
| Secrets in the front-end bundle | Service keys for email, calling, maps or AI models sitting in plain text in the shipped JavaScript | Anyone can copy them and use them under your organization's identity |
| Real data used as seed data | Customer names, addresses and phone numbers committed as "test," "backfill" or "demo" records and never removed | A privacy incident that needs no attacker skill at all |
| Access checks enforced in the browser | The app decides who is an admin, or whose records to show, in client-side code | Client-side controls can be edited away; without a server-side check they are suggestions, not boundaries |
| Permissive backend access rules | Backend-as-a-service databases with row-level security disabled or set to allow everyone | Another customer's data, or all of it, comes back to any visitor who asks |
| An exposed map of the backend | API addresses, database table names and admin screens that are never linked in the interface | It hands an attacker the reconnaissance work for free |
| AI and agent credentials | System prompts, tool definitions and tokens that let the app call models, payment or messaging services | These keys are worth far more than a map key and are just as exposed |
Why vibe coding is a security team problem, not just a developer problem
Most guidance on vibe coding security is written for the person building the app, but that misses where the risk actually lands.
Vibe coding tools put app building in the hands of marketing, operations, sales and product teams. Those apps are often built outside the software development lifecycle, deployed on third-party hosting platforms and never registered with security. Escape.tech's researchers made the same point when they published their scan of vibe-coded apps, suggesting readers ask their marketing colleagues what they have already deployed (Escape.tech).
That makes these apps a form of shadow IT with a public front door. They carry your brand, sometimes your customer data and sometimes your credentials, but they are missing from your asset inventory. And from the outside, the application works perfectly, which is exactly why the team that shipped it often can't see the problem.
This is an external attack surface management problem as much as an application security one: you can't secure an internet-facing asset you don't know you own.
What one public JavaScript file can give away
A single-page web application, the kind most AI tools generate by default, ships its entire front end to the browser as JavaScript. That file is public by definition. Your browser has to download it to run it, and so can anyone else.
Reading that one file can surface material that was never meant to leave the server, including:
- Real customer records, with names, addresses and phone numbers baked into the code as seed or backfill data.
- Service keys that let the site send email, place calls or draw maps, sitting in plain text for anyone to reuse.
- A full map of the backend: the API address, database table names and admin routes that appear nowhere in the interface.
- Security decisions made in the browser, such as who counts as an administrator and which customer's data to display.
- The instructions behind AI features, and increasingly the credentials that connect an app to models, payment and messaging services.
In one recent review, we discovered a vibe-coded app shipped its entire customer list and the keys to its email account in its JavaScript, which was enough for anyone to copy the list and send convincing scam emails to those customers as the company.
None of this required exploitation. Build tools bundle whatever the code imports. When the fastest way to make a feature work is to drop a key or a data file straight into a component, that is what ends up in the shipped file. The model optimizes for "it works," not for "this must never reach the browser."
Real-world examples of vibe coding security failures
Our findings are not isolated. Public research points the same way.
- Row-level security gaps in a vibe coding platform. CVE-2025-48757 describes an insufficient database row-level security policy in Lovable through April 15, 2025, which allowed remote unauthenticated attackers to read or write arbitrary database tables of generated sites (NVD). The CVE record is marked as disputed. Either way, it shows how much rides on backend access rules that builders rarely test.
- Thousands of live apps scanned. Escape.tech analyzed more than 5,600 publicly available vibe-coded applications and identified more than 2,000 vulnerabilities, 400+ exposed secrets and 175 instances of personal data, including medical records and IBANs (Escape.tech).
- Backend keys published at scale. RedHunt Labs found more than 16,000 exposed Firebase credentials and more than 3,000 exposed Supabase credentials on vibe-coded sites, typically because builders embedded full-access credentials in public site code to fetch data (RedHunt Labs).
The common thread is not one platform or one model, it's shipping speed outrunning the review process.
How attackers find vibe-coded apps at scale
Finding this kind of exposure is mostly passive, and the method is simple enough to automate:
- Pull the bundle. Open the app, note the JavaScript files it loads, download them and beautify the minified code back into something readable.
- Scan for secrets and data. Run secret scanners over the code and search for telltale shapes: email and phone patterns, API base URLs, table names, provider key prefixes and admin lists.
- Map the backend. Identify the API address, backend tables and functions, and screens that are never linked in the interface.
- Search at scale. Content-indexing engines such as urlscan.io and PublicWWW reveal where a distinctive string of code appears across the web. Infrastructure scanners such as Censys and Shodan enumerate the hosts and ports behind an app.
What used to take a researcher an afternoon to accomplish can now run as a continuous sweep.
What we expect to see next
This is early. As AI-assisted development becomes the default rather than the exception, we expect the pattern to broaden and to be found faster:
- More exposure, found sooner. The same AI that writes these apps is very good at reading them; automated discovery of secrets and weak authorization in public bundles will become cheap and continuous, and attackers will run it at internet scale.
- Agent and integration credentials become the prize. As apps wire themselves to models, payment, messaging and "agentic" tools, the tokens for those services will increasingly ride along in the client, higher-value than a map key and just as exposed.
- Prompt and logic leakage as a category of its own. System prompts, tool definitions and business rules shipped to the browser will be copied by competitors and abused for prompt injection.
- Backend-as-a-service misconfiguration at volume. Fast-built multi-tenant apps with access rules that were never tested will keep surfacing cross-tenant data access as the dominant failure.
- A widening gap between "works" and "safe." Pipelines will ship faster than anyone reviews them, so the window between an app going live and its exposure being discovered will shrink.
How to find vibe-coded apps on your own attack surface
Security teams can turn the attacker's method around. The goal is to find these apps, and what they leak, before anyone else does.
- Inventory what carries your name. Look for subdomains, certificates and third-party hosting domains tied to your brand, including the default domains vibe coding platforms assign to new projects. Anything you didn't expect to find is a candidate shadow app.
- Read your own shipped code like an outsider. For every app you find, pull the JavaScript bundle and run it through a secret scanner. Check for keys, personal data patterns, admin routes and client-side role checks.
- Watch for your credentials outside your walls. Keys and credentials that leak from public code, or from infostealer-infected devices, tend to surface in breach dumps, paste sites and dark web markets. Monitor for your domain's credentials there, and rotate anything that appears.
- Set a lightweight policy. Decide who can ship AI-built apps, where they must be registered and what minimum review happens before launch. The aim is visibility, not a ban.
What to do about it: a vibe coding security checklist
If your colleagues are using AI to build, it's critical to put the few guardrails back that speed tends to skip. Share this with any team building with AI before an app goes live:
- ☐ Keep data and secrets on the server; let the browser hold nothing it would hurt to hand a stranger.
- ☐ Enforce every authorization decision on the server, for every tenant and every privileged action; treat the client as a convenience, never a boundary.
- ☐ Turn on and test backend access rules with a second account and with no login at all; both should come back empty.
- ☐ Add one automated gate to the build that fails when secrets, keys or personal-data patterns appear in the output, and strip debug logging and source maps from production.
- ☐ Before going live, put the application behind standard protections (a web application firewall and CDN), rotate anything that was ever exposed, and have someone read the shipped bundle the way an outsider would.
- ☐ Register the app with security so it is part of the monitored attack surface.
The finish got closer
Your security team doesn't need to stop the business from building with AI, but you need sight of what is being shipped. Vibe coding changed how fast we can ship, but it didn't change what it costs to get security wrong. It only moved that cost into a file anyone can download.
Ship fast. Just don't let "it works" be the finish line.
Styx Intelligence is an AI-native, analyst-backed external digital risk protection platform. Our attack surface management platform finds internet-facing assets you don't know you own, and our leaked credential monitoring watches for your credentials in infostealer logs and on the dark web. Comparing options? See how to choose attack surface management tools.
Free dark web scan
Are your credentials and keys already circulating?
See what's exposed for your whole domain, including infostealer logs.
Get your free dark web scanAbout the author: Hitesh Mittal is a Cyber Threat Analyst at Styx Intelligence, specializing in cyber threat intelligence, external attack surface management, and dark web investigations. His research focuses on emerging cyber threats and helping organizations proactively identify and mitigate digital risks.
Frequently asked questions
Is vibe coding safe?
Vibe coding can be used safely, but not by default. The AI optimizes for working code, so security steps like server-side authorization, secret management and access rule testing have to be added deliberately. Apps that skip those steps are where most exposure comes from.
Are API keys in front-end JavaScript always a problem?
Not always. Some keys, such as Supabase anon keys or other publishable keys, are designed to be public. They are only safe when strict backend access rules sit behind them. The real problem is secret keys with broad privileges, and public keys protected by rules that let anyone read everything.
Who is responsible for security in a vibe-coded app, the platform or the builder?
Both share it, but the organization that ships the app owns the consequences. Platforms supply defaults and warnings. The builder, and ultimately the business, is accountable for the data the app exposes. That is why security teams need visibility into these apps even when they didn't build them.
How can a security team find AI-built apps it doesn't know about?
Start from the outside. Enumerate subdomains, certificates and platform-hosted domains associated with your brand, then review each app's public code for secrets and personal data. Pair that with monitoring for your credentials in leaked data, and with a simple registration policy so new apps are visible from day one.
