How to Rotate API Keys After a Hosting Platform Breach

Most AI-built apps keep their most valuable secrets, from database passwords to payment and AI provider keys, on the settings page of the platform that hosts them, as “environment variables.” That’s the right place for them. It also means that when a hosting platform is breached, those keys may leave with the attacker.

October 2026 showed how often that can happen. If your app runs on a platform that disclosed an incident, the most useful thing you can do this week is rotate API keys after the breach, in the right order, and confirm nobody is still using the old ones.

What happened in October

On October 30, security firm Wiz published a write-up it called “Black October.” It lists nine AI developer platforms that disclosed security incidents during the month: Fireworks AI, Andromeda, Zeabur, Lightning AI, OpenCode, Railway, Warp, CommandCode and Northflank. Several of them pointed to stolen credentials as the way in. Zeabur says it is shutting down after its incident.

Northflank, a platform for deploying apps, databases and AI workloads, was the latest. On October 30 it told customers to assume that every secret stored in their environment variables had been decrypted and stolen, and to disable or replace all of their keys. Users then reported that AI provider keys they had stored on the platform were being used by someone else. Northflank has not said how the attackers got in.

Why this matters if you run on an AI-built app

Stolen keys get used quickly. Wiz describes two cases where stolen Amazon Bedrock credentials (Amazon’s service for running AI models) ran roughly 800,000 and 1.7 million AI requests before they were shut off. Wiz estimates the two cases together likely ran up more than $100,000 in usage at list price. It also says it saw signs that keys were tested within 30 minutes and then checked regularly to see if they still worked.

AI keys aren’t the only target. The same settings page often holds the key that can read your whole database, the key that can issue refunds from your payment account, and the key that sends email as your company. A key keeps working until someone replaces it, no matter how the attacker got it. Breaches aren’t the only way keys get out, either: our risk report for the week of Oct 26 covers 26,400 working keys found in public code.

Many owners don’t know where their app is hosted. If a freelancer or an AI tool set it up, it may be on a platform you’ve never logged into.

Is my app affected by a hosting platform breach?

Start with three questions for whoever built or maintains your app:

  1. Where is the app hosted, and where is its database? Get the platform names, not “in the cloud.”
  2. Which keys are stored there? Ask for a list by service: database, payments, email, file storage, AI providers, anything else.
  3. Has that platform disclosed an incident? Check the platform’s status page or security notices, and the list in Wiz’s write-up.

If the answer to the third question is yes, treat every key stored on that platform as known to someone else, even if the platform hasn’t confirmed that yours was touched. That’s the same advice Northflank gave its own customers.

How to rotate API keys after a breach

Rotating a key means creating a new one, putting it where the app reads it, and then switching the old one off. The order matters, because switching off first takes your app down.

  1. List every key. Use the answers above.
  2. Start with the keys that cost money or expose data. Payment keys, database passwords and AI provider keys come first. Email and analytics keys can follow.
  3. Create the new key at the provider, not on the hosting platform. Each service (Stripe, your database, OpenAI, Anthropic and so on) has its own page for this.
  4. Update the app’s settings with the new key, then redeploy and check the app still works.
  5. Revoke the old key at the provider. Until you do this, the old key still works for whoever has it.
  6. Check usage and billing at each provider for activity you don’t recognize, and report anything odd to the provider. Northflank advised the same.

Two follow-ups make the next incident cheaper:

  • Set spending limits and billing alerts with your AI providers, so a stolen key hits a ceiling instead of a five-figure bill.
  • Give each key only the access it needs. A key that can only read one table, or only create payments but not refunds, does far less damage if it leaks. If your app uses Supabase, its public key is only safe when every table has row-level security; we walk through the safe pattern in Supabase “permission denied” after Oct 30.

What to ask this week

  • Where is our app hosted, and has that platform reported a security incident this year?
  • Which keys are stored there, and when were they last replaced?
  • Do our AI provider accounts have spending limits and billing alerts turned on?
  • Who replaces our keys when a developer or freelancer leaves?

None of this needs a rebuild. If you’d rather have someone check it with you, our free Forward Scan looks at an AI-built app’s biggest risks, including where its keys live.

Sources

Does your business run on an AI-built app?

Our free Forward Scan is a 20-minute video walkthrough of your app’s 3 biggest risks, delivered in 2 business days.

← All posts

Free
2 days
Get a free Forward Scan