Blog · November 7, 2026 · 8 min read

Is my v0 app secure? Check before you share the link

Is my v0 app secure? Check NEXT_PUBLIC_ variables, Vercel environment variables, deployment protection, API routes and your database before you share your v0 link.

You described an app to v0, clicked Publish, and got a live link. It looks great. Now the question: can a stranger read other people's data, or find a secret key, just by opening that link?

Short answer: v0 builds on Next.js and Vercel, which have good defaults. But a good default is not a finished lock. The most common leaks in v0 apps come from a few small choices, and you can check them yourself in about 20 minutes. All you need is your live URL, your Vercel dashboard and a private browser window.

If you use other AI builders too, we have similar self-checks for Lovable, Bolt and Replit.

What v0 does for you, and what it does not

v0's own security page explains the main idea. v0 relies on the Next.js split between server and client environment variables:

v0 also says it analyzes NEXT_PUBLIC_ usage and warns about risks, and that the AI can move code into server-side places like Route Handlers and Server Actions. That helps. But a warning in a chat is easy to scroll past, and it can only warn about what it notices. It does not test your live app the way a stranger would.

The same page also says to rotate API keys regularly and to use different keys for development and production. We come back to that in the fixes.

1. Look for secrets with the NEXT_PUBLIC_ prefix

This is the number one v0 mistake. Anything named NEXT_PUBLIC_something is copied into the JavaScript your visitors download. That is fine for a value that is meant to be public, like a Supabase publishable key or your site's address. It is not fine for a password, a secret key or a payment key.

Open your project and search for NEXT_PUBLIC_. For each name you find, ask one question: would I be happy to print this value on a poster?

Name looks like Safe to be public?
NEXT_PUBLIC_SITE_URL Yes
NEXT_PUBLIC_SUPABASE_ANON_KEY or a publishable key Yes, if your database rules are on (see section 4)
NEXT_PUBLIC_OPENAI_API_KEY No. Anyone can use your account and you pay the bill
NEXT_PUBLIC_STRIPE_SECRET_KEY No. Never
NEXT_PUBLIC_DATABASE_URL No. It contains your database password

If you want the longer explanation, read Your API key is probably sitting in your JavaScript and Supabase publishable key vs secret key.

Test it from the outside. Open your live app in a private window, press F12 (or right-click, then Inspect), go to the Network or Sources tab, and search for the first 6 characters of your keys. Or run this in a terminal, with your own address:

curl -s https://YOUR-APP.vercel.app | grep -o '_next/static/[^"]*\.js' | head

Then download one of those files and search it:

curl -s https://YOUR-APP.vercel.app/_next/static/chunks/FILE.js | grep -o 'sk_live[A-Za-z0-9_]*\|sk-[A-Za-z0-9]\{20,\}'

If anything prints, treat that key as stolen. Rotate it at the provider first (create a new one, delete the old one), then fix the code.

Paste into v0: "Search the whole project for environment variables that start with NEXT_PUBLIC_ and list each one. For any that holds a secret (API key, token, password, database URL, Stripe secret), remove the prefix, move the call into a Route Handler or Server Action, and tell me the new variable name. Do not print any values."

2. Store secrets as Secrets in Vercel

When v0 deploys to Vercel, your environment variables live in Vercel's environment variable settings. Vercel now describes two types:

Older "Sensitive" variables still work and are shown as Secrets. Two details worth knowing from that page: a saved Secret cannot be turned back into Config (you delete it and create a new one), and Vercel hides Secret values of 32 characters or more if they show up in build logs.

Check in your Vercel project, under Settings, Environment Variables, that every real key is a Secret. If you ever pasted a key into the chat or into a file, rotating it is safer than hoping nobody saw it.

3. Check who can open your deployment

By default you may want the whole world to see your site. But some deployments should not be public: a half-finished preview, a staging copy, an admin test version.

Vercel's Deployment Protection controls who can open your preview and production URLs. Its recommended option is called Standard Protection, which protects all domains except your production domain. Vercel Authentication, which limits access to Vercel users with the right access, is available on all plans.

What to check:

  1. In Vercel, open your project and go to Settings, then Deployment Protection.
  2. Make sure preview URLs are protected, unless you want them public.
  3. Remember that your production link is meant to be public. Protection is not a substitute for a login inside the app.

Test it: open a preview link in a private window. If you land straight in the app without any sign-in, anyone with that link can see it.

4. Check your database, not just your pages

Many v0 apps connect to a database such as Supabase. Hiding a page does not protect the data behind it. A visitor does not need your pages at all. They can talk to the database directly with the public key that is already in your JavaScript.

If your app uses Supabase, the rules that keep users apart are Row Level Security (RLS) policies. Without them, the "public" key can read everything. Read Supabase Row Level Security in plain English, then run the 10-minute check in 16,326 Supabase databases were left open.

The fastest human test is the second-user test:

  1. Sign up as user A in a private window. Create a note, an order or a profile.
  2. Sign up as user B in a different browser.
  3. Can B see, edit or delete A's data? If yes, fix that before sharing the link.

Paste into v0: "Review every database query and every Route Handler. Each one must check that the user is signed in (return 401 if not) and must only return rows that belong to the signed-in user. List each route and what it checks."

5. Test your API routes without logging in

v0 apps often have routes under /api/.... Each one is a door. Open a private window and try your own routes while signed out. For example:

curl -i https://YOUR-APP.vercel.app/api/users
curl -i https://YOUR-APP.vercel.app/api/orders

You want to see 401 or 403. If you see 200 and a list of data, that route answers anyone. This also applies to admin pages: a button that is hidden in the interface is still reachable by typing the address. We explain this in Is your login check only in the browser?.

6. Rotate and separate your keys

The v0 security page recommends rotating keys and using different keys for development and production. In practice:

A 15-minute order of work

  1. Search for NEXT_PUBLIC_ and remove anything secret (section 1).
  2. Make sure every real key is a Secret in Vercel (section 2).
  3. Check preview protection (section 3).
  4. Run the second-user test and the database check (section 4).
  5. Call your API routes signed out (section 5).
  6. Rotate any key that was ever exposed (section 6).

For a wider list that works for any AI-built app, see A 10-minute security checklist before you launch.

Check it from the outside

Start with the stranger's view. Run the free Greenlight Scan on your live v0 link and get a traffic-light result in about a minute. It looks for secret keys in your JavaScript, weak headers and cookies, and known-vulnerable libraries. The $19 Full Scan goes deeper once you verify you own the site: exposed files, open Supabase or Firebase data (counted, never downloaded) and API routes that answer without a login, with a fix prompt for your AI builder for every finding. You can also start from our v0 tool page.

Automated scans catch the common mistakes, but they are not a human security review. If your app takes payments or stores sensitive personal data, treat these checks as a starting point.

Newsletter

The Friday leak report

One short email a week: the newest ways AI-built apps leak data, and the one-line fix for each. No spam, unsubscribe any time.