The booking app worked. Its three secret keys were public.
On 21 November 2026, a writer on Substack described an anonymous Reddit post about a booking app with three private API keys in its browser code. I haven’t read the original post or seen the app myself.
Someone who doesn’t program spent a summer building the app for their partner’s studio with Cursor and Claude. Customers could book and the app sent emails. With payments set up, the builder asked a friend who writes server software to look over the app before promoting it more widely.
The friend spent about an hour with the tools built into the browser and found three private API keys exposed in the app’s JavaScript: one for an AI service, one for email, and a live secret key for payments. With Stripe, for example, an unrestricted live secret key lets someone list customers and payments and issue refunds.
By default, Vite makes environment variables whose names start with VITE_ available to browser code. When the build uses one of those values in browser code, it puts the value in a JavaScript file anyone can download. The writer says the assistant gave the three keys that prefix so the browser could call the services directly.
In two weeks, the logs showed 212 requests for /.env. The server didn’t send the file. As far as the writer knows, nobody misused the keys. The JavaScript it sent to visitors already contained the keys.
The writer says the app had new keys that evening. The write-up also reports a hard spending limit and says the calls that needed private keys moved to server functions.
I spent years working on an expense app at Expensya. With a Save button, I’d check what happens if someone taps it again while the first save is still running.
Open your site and look in the browser’s developer tools for the files the page loaded. Search those files for a prefix your provider uses for private keys, such as sk_live_. A key might use a different prefix or load later, at checkout for example. A sample key can share the prefix. Compare a match with your deployment settings and your provider account, which may show only part of each key.
If it could be one of your private keys, treat it as exposed and revoke it with your provider. Affected features may stop working until they call your server and it uses the replacement key. Check the account for activity you don’t recognise. Keep the new key on the server and have the server check what each visitor is allowed to request. If the server forwards every request, a stranger can still make calls you pay for.
If you’re worried about where your app keeps its private keys, you can book a free one-hour call with me.