How I Exposed an AI Company’s Finances
A Supabase anon key was exposed in a public JavaScript bundle, and an internal cache table lacked Row Level Security, allowing unauthenticated read access to sensitive financial metrics. An attacker could retrieve real-time ARR and growth data by querying the PostgREST API directly.
medium.com
Published on medium.com
In the rush to deploy cutting-edge AI, security often rests on a single point of failure: configuration. Developers frequently assume that because a Database-as-a-Service (DBaaS) like Supabase provides a “public” anon key, the data behind it is automatically shielded.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the internal cache table was created without Row Level Security enabled, so the public anon key could read it directly through the auto-generated API.
Impact
The exposed data included live ARR and growth rate figures, which are board-level and investor-sensitive, and the company rated the issue critical.
What the attacker needed
Public JavaScript bundle; Supabase anon key exposed; internal table without RLS
The fix
The company rotated the exposed anon key and enforced a deny-all RLS policy on the cache table, then audited other internal tables.
How it was found
- Open Chrome DevTools and inspect the JavaScript bundle for the pricing page.
- Search the de-obfuscated bundle for Supabase configuration.
- Extract the Supabase URL and anon key from the client initialization code.
- Query the PostgREST endpoint for the arr_cache table using the anon key.
- Observe the 200 OK response containing financial metrics.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A website's JavaScript code is visible to anyone, so any secret key placed there is effectively public. The company used a database service where tables are automatically exposed as web endpoints, and they forgot to restrict access to an internal table. This let anyone read private financial numbers without logging in.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.