Is my v0 app secure? A check for v0 apps on Vercel
NEXT_PUBLIC_ is copied into the JavaScript every visitor downloads, every Server Action should be treated as callable by a direct POST request, and Vercel's recommended Standard Protection leaves production domains public. Check those three, then your v0 chat's visibility and the database rules behind any Supabase integration.Why does a v0 app still need a check?
v0's security docs say it analyses NEXT_PUBLIC_ usage and warns about risks, and its DeepSec review looks for problems such as missing authentication and authorization checks. Both help. But the rules about who may see which data are specific to your app. In a 2026 preprint of 200 vibe-coded apps, broken access control was the most common problem, found in 64% of the apps (the study covered apps built with Claude Code and Lovable, not v0).
The pre-launch check
NEXT_PUBLIC_names. Search your project:grep -rn "NEXT_PUBLIC_" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include=".env*" --exclude-dir=node_modules --exclude-dir=.next .Next.js inlines these values into the browser bundle at build time, so aNEXT_PUBLIC_variable must never hold a secret key, a service_role key or a payment secret. Publishable keys, such as the Supabase anon key, are fine there.- The live bundle. Open your deployed site, open the browser's developer tools, and search the loaded JavaScript for
sk_live,sk-,secretandservice_role. If you find a real key, rotate it at the provider, move it to a variable without theNEXT_PUBLIC_prefix, and redeploy. - Server Actions and Route Handlers. Search for
'use server'and open everyroute.tsorroute.jsfile underapp. Each one must check who the user is, and that they own the record, inside the function itself. The Next.js docs say to treat Server Actions as reachable via direct POST requests. Test a Route Handler signed out:curl -i https://your-app.vercel.app/api/your-routeshould return 401 or 403. - Variable type. In the Vercel project, open Environment Variables. Set the type of API keys, passwords and tokens to Secret, which makes them write-only after saving. Variables created by an integration cannot be switched to Secret from that list. v0's docs recommend different keys for development and production.
- Who can open the deployments. In Vercel, open Settings, then Deployment Protection. Standard Protection protects every deployment URL except your production domains. That is right for a public app. An internal tool needs All Deployments or another method your plan offers.
- Chat visibility. Open Invite in the v0 chat header. Anyone on the web means anyone can view the chat, and it may be indexed by search engines and appear in public galleries. If you ever pasted a key or customer data into a prompt, make the chat Private and rotate the key.
- Database rules. If you connected Supabase through v0's integrations, every table needs row level security with owner-based policies. See our Supabase RLS guide.
What do v0 and Vercel protect, and what is still your job?
| Area | v0 and Vercel do this | Still your job |
|---|---|---|
| Environment variables | Keep variables without NEXT_PUBLIC_ on the server. v0 warns about risky NEXT_PUBLIC_ use. | Never give a secret a NEXT_PUBLIC_ name. Mark keys as Secret in Vercel. |
| Server code | Run server-side code as isolated Vercel Functions. | Check sign-in and ownership inside every Server Action and Route Handler. |
| Deployments | Offer Deployment Protection. Standard Protection covers every deployment except production domains. | Decide whether production should be public. |
| Code review | DeepSec, on paid plans, reviews changed files or the riskiest files for missing auth, injection and SSRF. | DeepSec skips environment files, credentials and keys, so scan for secrets separately. |
| Data | One-click database integrations add the environment variables for you. | Write the access rules: RLS policies or server-side checks. |
If you find a problem
Rotate any exposed key first (see our guide on leaked keys), then fix the code and redeploy. Re-test signed out and as a second user, because a fix that makes an error disappear can also remove a check.
Or have it checked: the Irth Labs App Health Check is $490, a written report within 48 hours with a fixed repair price.
1. Run the free local check
npx caelo .
Caelo is a free, open source (MIT) command line tool and MCP server from Irth Labs that checks the files of an AI-built app for exposed API keys, Supabase and Firebase misconfigurations and .env files with real values. It runs on your machine, uploads nothing and uses no AI model. Each finding comes with a plain-English fix.
2. Act on a finding
Follow the fix in your report and run Caelo again. If Git could commit an untracked file containing secrets, preview a US$19 quick fix for that file.
For findings that need an engineer, Irth Labs offers a US$490 App Health Check. You receive a written report within 48 hours and a fixed repair quote. The fee counts toward the repair if you proceed.
Questions
Is the Supabase anon key in a NEXT_PUBLIC_ variable a leak?
No. The anon (publishable) key is designed to be public, as long as every table has correct row level security. The service_role key must never have a NEXT_PUBLIC_ name.
Does v0's DeepSec find leaked keys?
Do not rely on it for that. DeepSec looks for issues such as missing authentication, injection and SSRF. v0's docs say it skips environment files, credentials and keys, and in a larger project it covers the riskiest files rather than every file. Use a secret scanner for keys.
Is my v0 chat public?
Only if you made it public. In the Invite dialog, a personal chat marked Private is limited to you. Anyone with the link lets anyone with the URL open it, and Anyone on the web lets anyone view it, possibly through search engines and public galleries. Team chats follow the team's default visibility, and Vercel team Owners can open team chats by URL.
Is v0 itself insecure?
This is about the apps built with it, not the tool. The same checks apply to Lovable, Bolt, Replit and Cursor apps.
Sources
- v0 docs: Security.
- v0 docs: DeepSec.
- v0 docs: Sharing.
- v0 docs: Deployments.
- v0 docs: Databases.
- Next.js docs: Environment variables (bundling for the browser).
- Next.js docs: Data security (Server Actions).
- Vercel docs: Deployment Protection.
- Vercel docs: Config and Secret environment variables.
- Supabase docs: Row Level Security.
- Deng, Fan and Meng, 2026. Understanding the (In)Security of Vibe-Coded Applications. Preprint.