Skip to content
BuildThenTestedSee packages

v0 app security: defaults, what breaks, what to check

v0 is Vercel's AI builder that generates Next.js, Tailwind and shadcn/ui code from prompts and deploys it to Vercel. Below: what it configures by default according to its own documentation (verified 2026-09-21), the 15 patterns most associated with it, the security features the vendor offers and where they stop, and a checklist you can run without buying anything.

The v0 docs do not describe default auth or RLS setup for database integrations; the user chooses and configures the provider.

v0 generates Next.js code with Tailwind and shadcn/ui and deploys it to Vercel. Databases come from integrations such as Supabase or Neon; auth is whatever you connect. Environment variables live on Vercel and only those prefixed NEXT_PUBLIC_ reach the browser.

Because v0 leaves the database and auth choices to you, a v0 app's risk sits in three places. Server actions and route handlers that trust the caller. Environment variables that were prefixed for the browser by habit. The database provider's own rules. The checks below start there.

What v0 sets up by default

Each row is taken from the vendor's documentation on the date shown. Defaults change; the date is the claim.

Defaults of v0 as documented by the vendor
AreaDefaultSource
Frontendv0 defaults to Next.js for full-stack apps, with server actions and App Router route handlers for backend code; styling uses Tailwind CSS and shadcn/ui.docs · verified 2026-09-21
Backend / databaseDatabase integrations (Supabase, Neon, Upstash) are added from project settings or chat; the integration provisions an account on the service and adds the needed environment variables. v0 can generate and run SQL.docs · verified 2026-09-21
Hostingv0 deploys projects to Vercel. Every project has a stable production URL on vercel.app; preview deployments come from working branches with unique URLs. Who can access the app depends on the team's plan and deployment protection settings.docs · verified 2026-09-21
Secrets / env varsEnvironment variables are added in Project Settings, encrypted and stored on Vercel, scoped to Development, Preview or Production. The v0 preview can read only Development variables.docs · verified 2026-09-21
Source accessConnecting GitHub creates a private repository and pushes the current code; v0 works on branches and opens pull requests, and repository rules such as required reviews can block the merge.docs · verified 2026-09-21
Browser exposure of variablesOnly variables prefixed NEXT_PUBLIC_ are exposed to the browser; variables without the prefix stay on the server.docs · verified 2026-09-21

Documentation home: v0.app/docs

What breaks in v0 apps

37 patterns in the catalogue name v0; the most severe are listed here across secrets and keys, data access, login and permissions, payments, ai features. Attribution is descriptive: the default stack makes the pattern reachable, or a public incident names it.

Public incidents

Lovable reported that from 3 February to 20 April 2026 a backend regression let any logged-in Lovable user read the chat history and source code of public projects; a fix shipped within two hours.

  • 2026-02-03 to 2026-04-20 Exposure window
  • 2026-02-22 First HackerOne report
  • about 2 hours Time from public report to fix

Apr 2026 · Lovable · all sources

One education app built on Lovable had 16 vulnerabilities, 6 critical; a database function denied callers whose role was 'authenticated', so anonymous callers passed and 18,697 user records were readable without login.

  • 16 Vulnerabilities found
  • 6 Critical
  • 18,697 User records exposed
  • 14,928 Unique email addresses
  • 870 Enterprise users with full PII

Feb 2026 · Taimur Khan · all sources

A scan of 1,645 Lovable-built apps found 170 (about 10.3%) with database endpoints readable without login because Supabase row-level security policies were missing or too broad; recorded as CVE-2025-48757, CVSS 9.3.

  • 1,645 Apps scanned
  • 170 Apps with inadequate RLS
  • 10.3% Share of scanned apps
  • 303 Exposed endpoints
  • 9.3 Critical CVSS 3.1 base score (CVE record)
  • 8.26 Researcher's own CVSS base score
  • 2025-03-21 Scan date
  • 2025-05-29 Public disclosure

May 2025 · Matt Palmer (Replit, Inc.) · all sources

Moltbook, a social network for AI agents built with AI-generated code, ran a Supabase database without row-level security policies, leaving 1.5 million API tokens and 35,000 email addresses readable and writable without login.

  • 1.5 million API authentication tokens exposed
  • 35,000 Email addresses exposed
  • about 17,000 Human account owners in database
  • 2026-01-31 Reported to maintainer
  • 2026-01-31 (within about 2 hours) First fix applied

Feb 2026 · Wiz Research · all sources

Each entry links to its primary source in the evidence list. What to do about it is the self-check below.

v0's own security features, and where they stop

Stated from the vendor's documentation. The limits are the vendor's scope statements, not judgements.

  • Environment variable handling

    v0 relies on the Next.js NEXT_PUBLIC_ distinction and the docs describe automatic analysis and refactoring to keep non-public variables server-side.

    Where it stops: Any value you prefix with NEXT_PUBLIC_ is shipped to the browser by design.

    vendor docs · verified 2026-09-21

  • Generated code treated as untrusted

    The docs state v0 considers all generated code potentially incorrect or adversarial and applies code analysis, sandboxed execution and input validation before running it.

    Where it stops: These controls apply to running code inside v0; the deployed app's authorization logic is still the project's own code.

    vendor docs · verified 2026-09-21

  • Git-based publishing

    Changes flow through branches and pull requests; repository branch protections apply to v0's merges.

    Where it stops: Only applies when the project is connected to GitHub.

    vendor docs · verified 2026-09-21

  • Enterprise controls

    SAML SSO, role-based access, audit logging, separate processing infrastructure and an opt-out from model training for Enterprise customers.

    Where it stops: Listed for Enterprise customers.

    vendor docs · verified 2026-09-21

Check it yourself, in this order

The critical patterns first. Each uses the dashboard and your browser.

NEXT_PUBLIC_ prefix on a secret

  1. In your hosting dashboard (Vercel: Project, Settings, Environment Variables) or your .env files, list every variable whose name starts with NEXT_PUBLIC_.
  2. For each one, ask whether the provider calls that value secret, private, server or admin. Stripe secret keys, model provider keys, database passwords and Supabase service_role keys all fall in that group.
  3. Open the live site in Chrome, right-click, choose Inspect, open the Sources tab and press Ctrl+Shift+F. Search for the first few characters of each suspect value.
  4. A bad result is a NEXT_PUBLIC_ variable holding a server-only key, or a search hit for that key's value in a loaded script.

Secrets committed to the code repository

  1. Open your project on GitHub (or the code view in your builder) and look at the file list for .env, .env.local, .env.production, serviceAccountKey.json or firebase-adminsdk files.
  2. Use the repository search box and search for sk_live, sk-, service_role, BEGIN PRIVATE KEY and password=.
  3. If you have the code on your computer, run one command in the project folder: git log --all -p -S sk_live -- . | head. Any output means a live key has been committed at some point.
  4. On GitHub, open Settings, then Code security, and check whether Secret scanning shows alerts.
  5. A bad result is any env or key file in the file list, any search hit that shows a real key, or an open secret scanning alert.

Service-role key shipped in the browser bundle

  1. Open your live app in Chrome, right-click anywhere and choose Inspect, then open the Sources tab.
  2. Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search every loaded file. Search for service_role and then for sb_secret_.
  3. Open the Network tab, reload the page, click any request whose address contains supabase.co, and read the apikey header under Request Headers.
  4. In the Supabase dashboard, open Project Settings, then API Keys, and compare that header value with your keys.
  5. A bad result is any search hit, or a header value that matches the service_role or secret key rather than the anon or publishable key.

v0 pre-launch checklist

37 checks, in the order we run them. Usable without buying anything.

Self-check tool

Answer questions about your app and get the patterns that apply, ordered by severity. Runs in your browser; nothing is sent.

Run the self-check

Packages for v0 apps

Pre-launch check

Start here

For founders about to let real users in.

$490

Report in 48 hours
  • Keys and secrets in the browser or repo
  • Who can read and change whose data
  • Login, roles and admin routes
  • Errors, retries and rate limits
  • Debug mode, headers, deploy path

What you receive

Security sweep

For anyone who wants the three riskiest areas checked fast.

$290

Report in 24 hours
  • API keys and secrets in the bundle
  • Row-level rules on every table
  • Cross-user data reads
  • Admin and hidden routes
  • Client-only permission checks

What you receive

All packages and prices. Every report includes a re-check after your fixes.

Questions about v0

v0 app audit

We check the Next.js server actions and route handlers for permission checks, the bundle for NEXT_PUBLIC_ variables that carry secrets, the Vercel deployment protection settings, and the connected database's access rules. Findings include the file and function to change.

v0 security

v0's docs state that generated code is treated as untrusted and that only NEXT_PUBLIC_ variables are exposed to the browser. The remaining questions are about your app's logic: does each server action verify the user, and does the database enforce row rules. Both are testable from the outside with two accounts.

is my v0 app safe

Run the Next.js and Supabase (or your provider) self-checks on this site. Then read your environment variables page on Vercel: anything starting NEXT_PUBLIC_ is public. If a secret is there, rotate it and move it.