Vibe coding lets you build an app fast with AI tools. But an app that works in a demo can still leak customer data, let strangers into accounts or run up bills on your API keys. This guide explains the 7 most common vibe coding security risks in plain English, what each could cost your business, and what to ask your developer before launch.

For the broader steps involved in moving from a prototype to a live product, see AI-generated code in production.

TL;DR

  • Most security gaps are invisible in a demo: the app looks fine, but the checks behind the screen are missing.
  • The biggest risks: customers seeing each other’s data, secret keys visible to anyone, and logins that only look protected.
  • One confirmed serious issue is a good reason to delay launch.
  • You don’t need to fix these yourself. You need to know what to ask, and have someone who didn’t write the code check it.

Is vibe coding safe?

Vibe coding is fine for prototypes, demos and internal tools without real data. It becomes risky when real users, personal data or payments arrive.

AI tools are good at making features work, but less reliable at the parts you can’t see, such as who is allowed to view which data. Fu and colleagues studied 733 AI-generated code snippets from GitHub and found security weaknesses in 29.5% of Python snippets and 24.2% of JavaScript snippets.

That doesn’t mean your app is unsafe. It does mean it needs checking before launch.

Still planning? 4 decisions to make before you start

  1. Decide who checks security. Someone who didn’t write the code, human or AI, should review it before launch.
  2. Collect only the data you need. Less personal data means less risk and less GDPR work.
  3. Use proven providers for login and payments. Don’t let AI build these from scratch.
  4. Budget for a review before launch, not after a breach.

Why security gaps can survive a demo

An AI tool can build a working invoice dashboard, but it may not set the right access permissions. Your developer needs to define which invoices each customer can view, what happens when a login session expires, and which actions require administrator access.

These permissions must work on the server, not just on the screen. For example, hiding an admin button does not prevent someone from sending the same request directly to the server. Testing should confirm that users can only access their own records and that the server rejects actions they are not allowed to perform.

Seven vibe coding security risks to check

vibe-coding-security-risks-seven-risks
Figure 1. Seven risks in vibe-coded apps, and when each one blocks launch

The risks below concern the application and its deployment, whether AI wrote some or most of the code. Run initial checks only in systems you own or are authorised to assess, using test accounts and synthetic data. Record unexpected results so your engineer can reproduce and investigate them.

1. Customers can see each other’s data

What it means: The app shows a record when given its ID, without checking who owns it.

What could happen: One customer opens another customer’s invoices or profile. That is a personal data breach you may have to report.

Ask your developer: “Have you tested with two accounts that user A can never see user B’s data?”

For your developer

A signed-in customer should only retrieve or change records their permissions allow. The common failure is an insecure direct object reference (IDOR): the app accepts a record ID without checking who owns it. Broken access control in AI-built apps explains the pattern in depth; the two checks below show whether your app has it.

Initial check: Create separate test accounts with different records. Where the app uses record links, try opening a record from account A while signed in as account B. Record any unexpected disclosure.

Technical verification: Test permissions on the underlying requests, including updates and exports. A rejected page load alone does not establish that every operation is protected.

2. Logins that only protect the screen

What it means: The app hides a page from people who aren’t logged in, but the server behind it doesn’t check.

What could happen: Logged-out visitors or regular users reach admin features or customer data directly.

Ask your developer: “Does the server check login and permissions on every request, not just on the page?”

For your developer

A redirect to the login page controls what the visitor sees. The server must also validate the session and the permissions required for each protected request. Otherwise, someone may reach data or perform an action without using the intended screen.

Initial check: Open a protected page while signed out, then try an administrator page with an ordinary test account. Investigate any protected information that appears.

Technical verification: Request the protected data or action directly with no valid session and with insufficient permissions. Confirm that the server refuses both cases.

3. Secret keys visible to anyone

What it means: Keys that connect your app to payments, AI services or your database are included in code that every visitor’s browser downloads.

What could happen: Someone copies your key. You pay their usage bill, or they get into your data.

Ask your developer: “Are any secret keys in the frontend code? Have keys that were ever exposed been replaced?”

For your developer

A secret key may authorise spending, access to data or administrative actions. Including it in files sent to the browser makes it available to visitors. Some providers also issue publishable keys intended for browser use, so the key’s purpose and permissions matter.

Initial check: Ask for a secrets scan of the repository and the files delivered to the browser. Have your builder identify which visible keys are publishable and which require confidentiality.

Technical verification: Check each key against the provider’s documentation and actual permissions. Revoke or rotate exposed secrets, secure their replacements and investigate possible misuse.

4. A database open wider than intended

What it means: The database rules allow more people to read or change data than you planned.

What could happen: Anyone who finds the connection can read, change or delete customer records.

Ask your developer: “What can an anonymous visitor read in our database? Show me the test.”

For your developer

Hosted backends may expose data through APIs used by the browser. Their permissions must still limit what each user can read and change. An overly broad role or policy can make sensitive records accessible beyond the intended audience.

Initial check: Ask which data is available to anonymous and signed-in users, and request evidence that the permissions were tested with separate accounts.

Technical verification: Review grants and, where used, row-level policies together. Test the actual roles used by the app; some privileged roles can bypass row-level rules. The correct configuration depends on how requests reach the database.

5. Forms that accept anything

What it means: The app trusts whatever people type into forms and fields.

What could happen: Attackers use a form to pull data out of your database or plant code that runs in your customers’ browsers.

Ask your developer: “Is every input checked on the server, not just in the form?”

For your developer

The server needs rules for the data it accepts, such as permitted values, lengths and formats. It also needs safeguards for how that data is used. Parameterised database queries and context-appropriate output encoding help prevent input from becoming database instructions or executable browser content.

Initial check: Try harmless values outside a field’s expected format, such as text in a numeric field. Record unexpected acceptance or errors.

Technical verification: Check server-side validation and the paths that use or display the submitted data. Confirm the relevant protections against injection and cross-site scripting. A form rejecting one invalid value is only an initial signal.

6. Unknown add-ons in your code

What it means: AI tools add ready-made code packages to your app. Some are outdated, unsafe or don’t exist at all.

What could happen: Harmful code runs inside your product without anyone noticing.

Ask your developer: “Can you explain every package we use? Is automatic scanning switched on?”

For your developer

Third-party packages run code within your development or application environment. An AI suggestion can name a nonexistent package or recommend a version with known vulnerabilities. Installing a package without checking its origin can introduce malicious or unsafe code.

Initial check: Request the dependency list, including versions, and ask how unfamiliar packages were selected and verified.

Technical verification: Confirm package identity and provenance, scan for known vulnerabilities and assess whether affected functionality is reachable in your product. Investigate suspicious packages even when a vulnerability scanner reports no findings.

7. No alarm when something goes wrong

What it means: The app keeps no useful record of suspicious activity, doesn’t limit repeated requests, and shows internal details in error messages.

What could happen: You don’t notice an attack in time, bots run up your costs, or error messages give attackers clues.

Ask your developer: “Would we know if someone attacked us? Is there a limit on login attempts?”

For your developer

These controls serve different purposes. Security logs support detection and investigation. Request limits help contain automated abuse. Safe error handling prevents failures from revealing sensitive details or bypassing controls. Each needs its own check.

Initial check: Ask your team to demonstrate three things: a relevant security event appearing in the logs, a controlled test of login or API throttling, and a failed operation returning a safe response.

Technical verification: Confirm useful events and alerts, test abuse protections and inspect failure paths. Keep credentials and unnecessary personal data out of logs, and restrict access to the logs themselves.

Recognised one or more of these in your own product?

A self-check shows a warning sign, not a confirmed vulnerability or how deep it goes. An AI-built product review checks access control, secrets and data handling in your actual codebase and tells you, in plain English, which findings block launch and which can wait.

Book an AI-built product review

Which risks block launch and which can wait

One confirmed serious security risk is enough to delay launch. If testing shows that someone can access another customer’s data, use restricted features without permission, or exploit a weakness that could cause serious harm, fix the issue before releasing your app.

Other findings can be addressed after launch if the risk is acceptable. Your developer or reviewer should assess how easily each issue could be exploited, what data or systems it affects, and the potential business impact.

The table below shows when common security risks should stop a release.

RiskWhen it should delay launch
1. Customers can see each other’s dataTesting shows one user can see or change another user’s data.
2. Logins that only protect the screenSomeone who isn’t logged in, or doesn’t have permission, can still get data or use a protected feature.
3. Secret keys visible to anyoneA working secret key is visible to visitors and can be used to access data, take admin actions or run up costs.
4. A database open wider than intendedTesting shows visitors or users can read, change or delete data they shouldn’t.
5. Forms that accept anythingTesting shows a form can be used to pull data out or run harmful code.
6. Unknown add-ons in your codeA package is confirmed harmful, or a known weakness in it can be used against your live product.
7. No alarm when something goes wrongBots can cause real damage, error messages reveal sensitive details, or you would have no way to spot an attack.

Fix access and permission issues before customers start using the product. Once real customer records exist, changing permissions may also require database updates or changes to existing records. That can make the fix more expensive and disrupt live operations.

For lower-risk issues, document why they can wait, who will fix them and the deadline.

Before onboarding paying customers, have any unresolved security warnings checked by a qualified reviewer. A self-check can identify potential problems, but further testing is needed to confirm whether they are genuine launch blockers.

For a broader assessment of security, performance and operations before launch, see our production readiness review.

What happens when a vibe-coded app leaks personal data

In short: if personal data leaks, you may need to report it to the regulator within 72 hours and tell the people affected.

If your vibe-coded app leaks personal data, the GDPR applies just as it would to any other app. Using AI to write the code does not change your data protection responsibilities.

For organisations acting as data controllers, the GDPR sets specific requirements:

  • Article 33: Report a personal data breach to the relevant data protection authority without undue delay and, where feasible, within 72 hours of becoming aware of it, unless the breach is unlikely to pose a risk to people’s rights and freedoms. In the Netherlands, the authority is the Autoriteit Persoonsgegevens (AP).
  • Article 34: Inform affected individuals when the breach is likely to pose a high risk to their rights and freedoms, subject to the exceptions in that article.
  • Article 33(3) and (5): Provide information about the breach, including the categories and approximate numbers of affected people and records where possible. Document every personal data breach, even when notification to the authority is not required.

You can find these requirements in the GDPR.

5 things to ask your developer before launch

Start with these five questions. They cover the most common gaps, but they don’t replace an independent review. Depending on what testing finds, other issues may also need fixing before customers sign up.

  1. “Are all secret keys kept off the frontend, and has every exposed key been replaced?” Moving a key does not help while the old one still works.
  2. “Have the database access rules been switched on and tested with two accounts, user A and user B?” Do this before any real customer signs up.
  3. “Does the server check login and permissions for every page and every request that returns user data?”
  4. “Can you explain every package we use, and is automatic dependency scanning switched on?” Remove any package nobody can explain.
  5. “Who outside the team will review the code before real users arrive?” The reviewer should be someone who did not write the code.

Adding security instructions to AI prompts can help reduce vulnerabilities in generated code, including when revising existing code. However, better prompts do not guarantee a secure app. You still need to test access permissions and deployment settings, and have these controls independently reviewed before launch.

The full pre-launch list, including data handling and error handling, sits in the production readiness checklist.

How Sunbytes checks vibe-coded apps before launch

A vibe-coded app may already have access controls, protected API keys and database permissions in place. However, having these controls does not necessarily mean they work as intended. Before launch, the question is whether they have been tested against real user roles, data flows and potential security failures, rather than simply assumed to be working because the app runs as expected.

Sunbytes’ AI-built product review helps answer that question. Software engineers and security specialists assess the same codebase, examining access control, secrets, database permissions, dependencies, logging and deployment. The review identifies weaknesses, verifies how existing controls are implemented and prioritises findings by their impact on launch readiness. Each finding comes with supporting evidence and a plain-English explanation of what needs fixing before launch and what can be addressed later.

Reviews are conducted within Sunbytes’ information security management system, certified to ISO/IEC 27001:2022. Our team draws on 15+ years of software delivery experience and 300+ completed projects.


Author

Thien Le Marketing Executive

Thien Le is a B2B content writer with more than four years of experience in crafting compelling B2B content for a global audience, specializing in how people, technology, and business operations come together. At Sunbytes, she plans, connects insights from HR experts, edits, and uses technology to improve content quality. Her content helps readers cut through complexity and find practical information for hiring, paying, and managing people across borders.

What can we help you move forward?

Tell us what you are working on. We will connect you with the right Sunbytes solution.

[ENG] Submission form (Homepage, Service & Contact us)

This field is for validation purposes and should be left unchanged.
Your Full Name(Required)
Max. file size: 128 MB.
untitled(Required)
Untitled(Required)