Security Checklists

Bolt.new Security: Every Vulnerability Bolt's Frontend-First Code Leaves Open

April 17, 2026Last Updated: July 22, 20269 min read
Focus
Checklist
Risk
Critical
Stack
Bolt.new
Detection
Ubserve Runtime Simulation
Bolt.new pre-deploy security checklist for frontend and Netlify functions.

Bolt.new security checklist for 2026: how Bolt's frontend-first code exposes API keys and unprotected Netlify Functions, plus the exact fix for each.

A founder shipped a Bolt app with an OpenAI key hardcoded in frontend code. By morning, the key was scraped and their bill jumped by hundreds of dollars. Here is every gap Bolt leaves open, and how to close them.

Secure your vibe-coded app with Ubserve

  • Takes less than 60 seconds
  • 100+ security checks run through your app
  • Plain English explanations for each issue
  • AI fix prompts for every issue
Scan my app free

Is Bolt.new secure? Bolt.new's own hosting and build infrastructure, Netlify, is secure. The risk is architectural: Bolt is optimized to generate a working frontend fast, and by default that means API calls, secrets, and paid-provider credentials get written directly into client-side code. A Bolt.new security checklist covers eight gaps this pattern leaves open: API keys in client bundles, unprotected Netlify Functions, missing input validation, absent rate limiting, weak CORS rules, direct browser-to-provider API calls, unvalidated webhook signatures, and (when Supabase is the backend) disabled Row Level Security. Moving every paid API key to a Netlify environment variable and proxying provider calls through a server function eliminates the most common and costly mistakes. Scrapers actively index public JavaScript bundles for key patterns, and an exposed key is typically found and abused within hours of deployment, not days.

Why Bolt.new Apps Are Especially Vulnerable

Bolt.new's product goal is speed: describe an app, get a working, deployable frontend in minutes. That goal shapes every default it ships with, and none of those defaults are security defaults.

Three mechanisms explain most Bolt.new incidents:

  • Frontend-first generation. Bolt's fastest path to "it works" is calling a provider's API directly from the browser. There's no architectural prompt nudging it toward a backend proxy unless you explicitly ask for one, so the generated code frequently ships credentials to every visitor.
  • Opt-in, not default-on, backend security. Netlify Functions exist and can be secured, but Bolt does not add authentication, rate limiting, or CORS restrictions to them automatically. An unprotected function is functionally a public API endpoint the moment it's deployed.
  • Launch-speed pressure. Founders using Bolt.new are optimizing for shipping today, not next sprint. Security review gets skipped under the same time pressure that made Bolt.new attractive in the first place, which is exactly when a hardcoded key or an open function slips through.

A study of 100 vibe-coded apps found 41% shipped with exposed secrets or API keys and 21% had no authentication on at least one API endpoint. Bolt.new's frontend-first output pattern is a direct contributor to that first number.

Key Security Risks in Bolt.new Apps

Hardcoded API keys in client bundles: Bolt.new generates frontend-first code. If you call OpenAI, Stripe, or any paid provider directly from client code, that key is in the JavaScript bundle and readable by anyone. Scrapers find these within hours of deployment.

Missing auth on Netlify Functions: Bolt scaffolds Netlify Functions as backend handlers, but does not add authentication by default. An unprotected function that reads or writes user data is publicly callable by anyone who discovers the endpoint URL.

Absent backend proxy architecture: Direct client-to-provider API calls expose your credentials and remove usage control. A backend proxy function keeps the key hidden and lets you add rate limits, auth checks, and logging.

Wildcard CORS on sensitive endpoints: Bolt-generated function configurations frequently allow all origins. This means any website can make credentialed requests to your Netlify Functions.

No rate limiting on AI routes: Calling AI providers through an unthrottled endpoint means any user — or bot — can send unlimited requests at your expense.

What Bolt.new doesn't tell you by default

  • Anything shipped in client JavaScript is public by design — no exceptions.
  • Paid API calls from frontend code expose your keys and remove all usage control.
  • Netlify env vars exist, but Bolt does not enforce a secure proxy architecture.
  • Ad hoc service wiring during launch rushes can bypass auth and validation completely.
  • Netlify Functions have no rate limiting unless you add it explicitly.

Check 1: API Keys & Secret Management

This is the single highest-priority item for any Bolt.new app. A hardcoded key doesn't fail quietly, it fails publicly, the moment your bundle is served.

API Key Audit Checklist

  • Never call OpenAI, Anthropic, Stripe, or any paid provider directly from Bolt frontend code.
  • Move all paid API keys to Netlify environment variables — not the frontend .env.
  • Search your built JavaScript bundle for sk-, service_role, sk_live_, and provider key prefixes before every deploy.
  • Rotate any key that appeared in client code, logs, or a preview deployment, even briefly.
  • Check preview and branch deploys separately — Netlify's preview URLs are public and frequently skip the environment-variable review a production deploy gets.
// Wrong — key exposed in client bundle
const response = await fetch('https://api.openai.com/v1/chat/completions', {
  headers: { 'Authorization': `Bearer ${import.meta.env.VITE_OPENAI_KEY}` }
});

// Correct — proxy through Netlify Function
const response = await fetch('/.netlify/functions/ai-chat', {
  method: 'POST',
  body: JSON.stringify({ message })
});
// The Netlify Function holds the key in process.env.OPENAI_API_KEY

Check 2: Netlify Function Security

Netlify Function Audit Checklist

  • Add auth checks in every Netlify Function that handles user data or paid operations.
  • Validate the user identity server-side before any write, mutation, or AI call.
  • Block anonymous function calls unless the endpoint is explicitly designed to be public.
  • Test token tampering and expired token flows on all protected function routes.
  • List every function in netlify/functions/ and confirm each one either requires auth or is intentionally public — an unreviewed function is a public API by default.
// netlify/functions/ai-chat.ts
export const handler: Handler = async (event) => {
  // Validate auth first
  const token = event.headers.authorization?.replace('Bearer ', '');
  const user = await validateToken(token);
  if (!user) return { statusCode: 401, body: 'Unauthorized' };

  // Then call the AI provider safely server-side
  const response = await openai.chat.completions.create({
    model: 'gpt-4',
    messages: JSON.parse(event.body || '{}').messages
  });
  return { statusCode: 200, body: JSON.stringify(response) };
};

Check 3: Database & Storage Security

Database Audit Checklist

  • If using Supabase, enable RLS on all tables and enforce auth.uid() in every policy. See the Row Level Security glossary entry for the exact policy patterns AI tools get wrong.
  • Prevent direct client writes to privileged tables or collections.
  • Scope storage access by owner with signed URLs — not filename secrecy.
  • Review Netlify Function-to-database permissions for least privilege.
  • Confirm Firebase rules (if used) block unauthorized reads and writes with real negative tests, not just a successful-path test.

Check 4: Input Validation & XSS

Input Validation Audit Checklist

  • Validate every request payload in Netlify Functions before processing — do not trust client input.
  • Sanitize user-generated content before rendering it in React components.
  • Reject oversized payloads and unknown fields to reduce the abuse surface.
  • Test stored XSS in message, notes, and profile input flows.

Check 5: CORS Configuration

CORS Audit Checklist

  • Allow only your production domain and explicit preview URLs as allowed origins.
  • Remove wildcard CORS for any function that handles authenticated or paid operations.
  • Restrict HTTP methods per endpoint to the minimum required (GET or POST only, rarely both).
  • Never expose stack traces or verbose error messages in Netlify Function production responses.

Check 6: Rate Limiting & Abuse Prevention

Rate Limiting Audit Checklist

  • Apply per-IP limits to expensive AI and data export endpoints using Netlify Edge Middleware or Upstash.
  • Add user-level throttles on authenticated high-cost routes to prevent individual abuse.
  • Protect login and password reset flows against brute-force traffic.
  • Log rate-limit hits and alert on burst anomalies — a sudden spike often means key scraping.
// Rate limiting with Upstash in Netlify Edge Function
import { Ratelimit } from '@upstash/ratelimit';
const ratelimit = new Ratelimit({
  redis: Redis.fromEnv(),
  limiter: Ratelimit.slidingWindow(10, '1 m'), // 10 requests per minute
});
const { success } = await ratelimit.limit(clientIP);
if (!success) return new Response('Too Many Requests', { status: 429 });

Check 7: Webhook Signature Validation

Many Bolt.new apps wire up Stripe or another payment provider within the first session. Webhook endpoints are a common miss because they look like they're working (the payment succeeds) even when the signature check is missing entirely.

Webhook Audit Checklist

  • Verify every incoming webhook's signature using the provider's SDK before trusting the payload — never process a webhook body on its own.
  • Store webhook signing secrets in Netlify environment variables, never inline in function code.
  • Reject webhook requests with missing or invalid signatures with a 400, and log the attempt.
  • Confirm the webhook handler is idempotent — a provider retrying a webhook should not double-process a payment or grant duplicate access.
// Correct — verifying a Stripe webhook signature in a Netlify Function
const signature = event.headers['stripe-signature'];
try {
  const stripeEvent = stripe.webhooks.constructEvent(
    event.body,
    signature,
    process.env.STRIPE_WEBHOOK_SECRET
  );
  // process stripeEvent only after verification succeeds
} catch (err) {
  return { statusCode: 400, body: 'Invalid signature' };
}

Check 8: Environment Variable Scoping

Netlify separates build-time and runtime environment variables, and Bolt.new's generated code does not always respect that boundary.

Environment Variable Audit Checklist

  • Any variable prefixed for client exposure (like Vite's VITE_ prefix) is bundled into the browser at build time — never put a paid API key or secret behind that prefix.
  • Keep server-only secrets as plain, unprefixed Netlify environment variables, accessible only inside Netlify Functions via process.env.
  • Set different environment variable values per deploy context (production, deploy preview, branch deploy) so preview builds can't accidentally use production credentials.
  • Audit Netlify's environment variable dashboard directly at least once before launch — don't rely on memory of what you set during the build session.

Bolt.new deploys to Netlify and commonly uses Supabase as a backend. After completing this checklist, review the Supabase security checklist for database-layer gaps. For a full pre-launch security sweep covering all AI-built app patterns, use the pre-deploy security checklist for vibe-coded apps.

Complete Pre-Launch Bolt.new Security Checklist

Before shipping any Bolt.new app, verify all of the following:

Critical (Ship Blockers)

  • No paid API key or secret in client-side JavaScript
  • Every Netlify Function handling user data or paid operations requires authentication
  • Supabase RLS enabled on all tables, with auth.uid() scoping (if applicable)
  • All webhook handlers verify signatures before processing

High Priority

  • No wildcard CORS on authenticated or paid-operation functions
  • Rate limiting applied to AI, payment, and data-export routes
  • Input validation on every Netlify Function payload
  • Environment variables correctly scoped between client-exposed and server-only

Production Hardening

  • Preview and branch deploys reviewed for leaked credentials separately from production
  • Stack traces and verbose errors disabled in production function responses
  • Storage access scoped by owner with signed URLs, not filename secrecy
  • Rate-limit and auth-failure logs monitored for burst anomalies

Run Your Security Audit

Want to know which Bolt.new vulnerabilities were quietly introduced during rapid AI shipping?

Start with the free Ubserve URL scan to catch public-surface issues like exposed frontend keys, source maps, missing headers, CORS mistakes, and verbose production errors. Use the full audit when you want Ubserve to review the real codebase for missing auth on function endpoints, Supabase RLS gaps, and every other pattern on this checklist. Paid reports include exact fix prompts you can paste into Bolt.new before launch.

Audit my Bolt.new app for these vulnerabilities


Most Bolt.new incidents are not caused by sophisticated attacks. They are caused by a key in a bundle, found by a scraper, in the first 24 hours after launch.

Run the audit. Fix what it flags. Ship with confidence.

About the author

Samuel, Founder & maker of Ubserve
Samuel
Founder & maker of Ubserve

I'm Samuel, known online as Mr. Ballaz. I build Ubserve, a security scanner for apps built with AI tools like Cursor, Bolt, Lovable, and Supabase. Before Ubserve, I did manual security audits by hand — checking auth, exposed keys, and RLS policies one by one. Ubserve is that manual audit, automated, running in under 60 seconds instead of days.

Related resources

FAQs

Is Bolt.new secure?+
Bolt.new's hosting and build pipeline (Netlify) are secure infrastructure. The risk is architectural: Bolt generates frontend-first code by default, and any paid API key or secret written into that frontend code ships to every visitor's browser. The platform isn't insecure, but its default output pattern is, unless you add a backend proxy layer yourself.
How do I secure a Bolt.new app before production?+
Move all paid API keys to Netlify environment variables, proxy every AI and payment call through a Netlify Function, add auth checks on every function handling user data, enforce Row Level Security if using Supabase, and scan your built JavaScript bundle for exposed secrets before deploying.
What are the most common Bolt.new security vulnerabilities?+
Hardcoded API keys in frontend code, missing auth on Netlify Functions, weak or absent CORS rules, unthrottled function endpoints, unvalidated webhook signatures, and direct client-to-provider API calls without a backend proxy.
Can I ship Bolt.new safely without a full backend rewrite?+
Yes. Adding secure Netlify Function proxies for paid routes, input validation, auth checks, and rate limits covers the critical security gaps without rebuilding the entire architecture.
How do I find exposed API keys in my Bolt.new app?+
Search your built JavaScript bundle for key prefixes like sk-, OPENAI_API_KEY, service_role, and Stripe's sk_live_. Ubserve also scans your frontend assets automatically as part of the free scan.
Does Bolt.new use Netlify for hosting?+
Bolt.new deploys to Netlify by default. Netlify Functions are your backend layer — all secrets and auth logic should live there, not in the Bolt-generated frontend code.
What happens if my OpenAI key is exposed in Bolt.new?+
Scrapers actively scan public JavaScript bundles for API key patterns. An exposed OpenAI key can generate hundreds or thousands of dollars in charges within hours of detection.
What does a Bolt.new security audit check?+
A proper Bolt.new security audit checks for exposed API keys in the client bundle, missing authentication on Netlify Functions, wildcard CORS rules, absent rate limiting, unvalidated webhook signatures, and — if Supabase is the backend — disabled or misconfigured Row Level Security. Ubserve's free scan covers the public-surface checks automatically; the full audit reviews the codebase for the rest.
Next step

Turn this resource into a real security check.

Review the guidance, then run the free scan to see whether this issue is actually exploitable in your app, no signup required.