Fix catalog

Fixes for AI-built apps

The production issues AI coding tools keep shipping, with detection steps and ready-to-copy fixes. Every finding links to the glossary and the blog posts that explain it in depth.

13findings
5critical

Security

Critical

Auth Check Only in Client Code

The auth gate runs only in a client component (useEffect redirect or conditional render), which an attacker bypasses by disabling JavaScript or hitting the API route directly.

Criticalauto-fix

IDOR Vulnerability on REST Endpoint

A REST endpoint returns resources by id without verifying the caller owns that resource. Any authenticated user can access any other user's data by changing the id in the URL.

Criticalauto-fix

Missing Row Level Security on Supabase Table

A public Supabase table has RLS disabled or has an overly permissive policy, meaning any authenticated user can read or modify every row regardless of ownership.

Criticalauto-fix

Secret API Key Exposed in Client Bundle

A sensitive credential (Stripe secret, OpenAI API key, Supabase service role key) is prefixed with NEXT_PUBLIC_, causing it to be inlined into the browser JavaScript bundle where anyone can read it.

Criticalauto-fix

Unverified Stripe Webhook

The Stripe webhook endpoint accepts any POST without verifying the signature header, allowing an attacker to forge subscription events, credit accounts, or cancel subscriptions.

Highauto-fix

Missing Input Validation on API Route

A POST or PATCH API route spreads the raw request body into a database write without validating that fields exist, match expected types, or lie within expected ranges.

Highauto-fix

No Rate Limiting on Sensitive Endpoints

Authentication, OTP, password reset, and LLM proxy endpoints accept unlimited requests per user, enabling brute force, quota exhaustion, and runaway costs.

Highauto-fix

Missing Security Headers

The app ships no security response headers, leaving it vulnerable to clickjacking, mixed content, MIME sniffing attacks, and cross-site scripting injection.

Highauto-fix

Open CORS Policy

An API route sets Access-Control-Allow-Origin to * on routes that accept credentials, allowing any origin on the internet to call your API in a user's browser.

High

LLM Endpoint Vulnerable to Prompt Injection

A route sends user input to an LLM without isolating it from system-level instructions, letting attackers override the model's behavior, exfiltrate system prompts, or trigger tool calls.

Stability

Testing