A v0 app is a Next.js project on Vercel, so it is as safe as its server code and the rules on its database. The two gaps we find most are server actions or API routes that change data without checking who is signed in, and secret keys placed in variables that start with NEXT_PUBLIC_, which Next.js copies into the code every visitor downloads. If v0 connected Supabase, the row-level security on each table decides what the public key can read. You can check all three yourself in under an hour, before real customers arrive.
This post is for founders and product leads who built an app in v0 and want to put real users on it. It explains where a v0 app tends to leak, what v0 and Vercel already handle, the checks to run by hand, and when to bring in help.
The short answer
Open the project's environment variables and make sure nothing secret has a NEXT_PUBLIC_ name. Then search the code for every server action and API route that writes data, and confirm each one reads the signed-in user and checks their permission before doing anything. If the app uses Supabase, try to read each table from a private browser window with the public key. You should get nothing back from tables that hold private data.
How a v0 app is put together
v0 writes a Next.js app from your prompts and runs a preview of it as you work. When you publish, it deploys to Vercel. If you connect GitHub, v0 can create a private repository, and from then on the repository holds the code. Each chat works on its own branch with its own preview deployment, and publishing merges a pull request into the base branch, according to v0’s GitHub documentation.
For data, v0 offers one-click integrations with Supabase, Neon, Upstash and Vercel Blob. Supabase is the common choice because it brings sign-in as well as a database. That matters for security, because a Supabase app often reads the database straight from the browser, and then the table rules do the work a server would otherwise do.
So there are three places to look: the server code Next.js runs on Vercel, the environment variables, and the database rules.
Server actions are public endpoints
Next.js server actions look like ordinary functions in the code, and v0 uses them a lot for forms and buttons that save data. Each one is reachable over HTTP by anyone who knows how to send the request. The Next.js documentation on data security says to treat them like public API endpoints and to check authentication and authorisation inside each action.
The failure we see is a page that hides a button from users who are not admins, while the action behind the button does no check of its own. Someone who copies the request from their browser’s network tab can call it anyway. The same applies to route handlers under app/api.
Middleware is not a substitute. In March 2025, CVE-2025-29927 showed that Next.js middleware could be skipped by sending one crafted header, on self-hosted apps running versions before 12.3.5, 13.5.9, 14.2.25 and 15.2.3. Vercel said apps hosted on its platform were not affected. The lesson holds anyway: put the permission check next to the data, in the action or route itself.
Environment variables and NEXTPUBLIC
v0 stores environment variables encrypted on Vercel, and you choose whether each one applies to Production, Preview or Development. v0’s preview panel only sees Development variables, which catches people out when a feature works in production and fails in the preview, or the other way round.
The rule that matters is the prefix. Next.js copies any variable whose name starts with NEXTPUBLIC into the JavaScript bundle at build time. v0’s own security page says variables without the prefix stay on the server, that v0 warns about risky NEXTPUBLIC use, and that you should rotate keys and keep separate keys for development and production. A Stripe secret key, an OpenAI key or a Supabase secret key with that prefix is readable by anyone who opens developer tools. We cover how to search for these in Exposed API keys in AI-built apps.
The Supabase public key is different. The publishable key, or the older anon key, is meant to be in the browser, and Supabase says so. It is safe only when row-level security is on.
The database rules behind the app
If your v0 app talks to Supabase from the browser, the same failure that hit Lovable apps applies. We wrote about it in Your Lovable app is probably public, and the fuller explanation of policies is in Supabase row-level security for AI-built apps. In short, a table without RLS can be read and written by anyone holding the public key, and a policy whose condition is true has the same effect.
If v0 connected Neon or another Postgres database through server code only, there is no public key to worry about, and the server action checks above carry the whole load.
The checks to run yourself
Set aside an hour. You need access to the v0 project, the Vercel project settings and, if you use one, the Supabase dashboard.
- List the environment variables. In v0, open the project menu, then Settings, then Environment Variables, or open the same list in Vercel. Any name starting with NEXTPUBLIC is public. Only the Supabase URL, the publishable or anon key and similar public identifiers belong there.
- Search the build. Run
npm run buildlocally and search.next/staticforsk_,sk-,sb_secret_,service_roleand the first few characters of each key you use. Anything you find has shipped to browsers. Move the call to a server action or route and rotate the key with the provider. - Find every write. Search the code for
"use server"and for files underapp/api. For each function that creates, changes or deletes data, check that it reads the current user from the session and refuses the request if that user should not do this. - Call one action logged out. In a private window, open the network tab, trigger a save while signed in as a test user in another window, then replay the request without the session cookie. It should fail.
- Test the database logged out. If you use Supabase, copy the project URL and publishable key from the page source and query each private table from the browser console. You should get an empty list. Then run Supabase’s Security Advisor and fix every error.
- Check preview deployments. Every branch gets a preview URL. If previews point at the production database, anyone with a preview link is working on live data. Give Preview its own keys and, ideally, its own database.
- Protect the production branch. In GitHub, turn on branch protection for the branch that deploys to production, with at least one required review. v0’s documentation says it leaves the pull request open when protections block the merge, so a person signs off before code goes live.
What the checks do not cover
These steps catch the problems that expose the most data for the least effort. They do not tell you whether sign-up can be abused, whether forms and AI features have rate limits, whether the app logs errors anywhere a person reads, or whether you have backups you have tried restoring. They also cannot judge business rules: whether a discount, a refund or a role change can be triggered by the wrong person depends on how your business works.
When to get a second pair of eyes
If the app holds customer data, takes payments, or you are about to show it to investors or a first large customer, an outside review is cheaper than an incident. Our vibe-coded app audit starts at $500, and you get a written report within a week, ranked by risk, covering database rules, keys, auth, server actions, rate limits and backups. If the fixes are more than you want to take on, Harden starts at $1,000 and we make the changes, and Rebuild starts at $8,000 for apps that need a proper server layer.
The same review applies to apps from other builders. See Is my Bolt.new app secure?, Replit app to production and Cursor app security review. For how we work with v0 projects, see the v0 integration page, or go straight to the audit page.
Questions we get asked
Does Vercel’s hosting make my v0 app secure?
It secures the hosting: isolated functions, encrypted environment variables and HTTPS. It cannot know which of your users may see which records, and that is where most problems in generated apps sit.
Is the Supabase key in my page source a leak?
The publishable or anon key is designed to be public. It becomes a problem when a table has RLS off or a policy that lets everyone in. The secret or service role key bypasses RLS and must stay on the server.
v0 warned me about a NEXTPUBLIC variable. What should I do?
Rename it without the prefix, move the code that uses it into a server action or route, and rotate the key, because it has already been in a public bundle.
Should I move off v0?
Usually not. The code is a standard Next.js project in your own repository, so developers can fix it in place. A rebuild makes sense when the data model is wrong at its core or business logic sits in the browser.
Sources and further reading
- Security, v0 docs, checked 21 November 2026: NEXTPUBLIC handling, Vercel Functions, key rotation
- GitHub, v0 docs, checked 21 November 2026: private repository, working branches, publishing through pull requests
- External APIs, v0 docs, checked 21 November 2026: environment variables per environment
- Data security, Next.js docs, checked 21 November 2026: server actions as public endpoints
- Environment variables, Next.js docs, checked 21 November 2026: NEXTPUBLIC inlined at build time
- CVE-2025-29927, NIST National Vulnerability Database, March 2025: Next.js middleware bypass
- Postmortem on Next.js middleware bypass, Vercel blog, March 2025
- Understanding API keys, Supabase docs, checked 21 November 2026
- vibe-coded app audit, the SBD service this post describes















