Join our Newsletter — 33% off our NHI Course
Home› Guides› When Your PaaS Provider Is Breached: Rotating Every…
Guide Secrets Management

When Your PaaS Provider Is Breached: Rotating Every Environment Variable Secret at Scale

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 18 November 2026 12 min read
On this page

When a platform-as-a-service provider tells you its control plane was breached, assume every secret you stored in its environment variables is in an attacker's hands, and rotate them in a deliberate order: revoke at the issuer first, replace, redeploy, then hunt for misuse. This playbook is written for engineering, platform and security teams whose applications run on a hosted PaaS, and who need to move from a provider's disclosure email to a fully rotated estate in hours rather than weeks.

October 2026 showed why this needs its own playbook. Three developer platforms disclosed incidents within weeks of each other in which environment variables held on the platform side were read or decrypted by attackers, and customers' AI provider keys, cloud credentials and database passwords were exposed at once. Generic vendor breach playbooks assume you need to work out whether you are affected. When the provider stores your secrets, you are affected by default, and the work is rotation at scale.

For the broader process of handling a SaaS supplier incident, including contracts, notification and supplier review, use the Vendor SaaS Breach Response Playbook. This page focuses on the secrets.

Key takeaways

  • Treat platform-held environment variables as compromised as soon as the provider discloses control plane or database access. The providers in the October 2026 incidents told customers to assume decryption.
  • Revoke at the issuing provider first, then create the replacement, then update and redeploy. Rotating only inside the PaaS leaves the old value valid wherever it was stolen.
  • Rotate in order of blast radius and speed of abuse: AI provider keys, cloud credentials, payment keys, private keys and signing keys, then database and service credentials.
  • Do not stop at environment variables. Platform tokens, sessions, Git provider app installations, registry credentials and anything on the platform's managed servers need attention too.
  • Hunt for misuse in the issuers' logs and bills, not just in the PaaS. Abuse of AI keys showed up as unexpected spend within hours.
  • Build the inventory and the automation before the next incident. The hardest part of each response is knowing which secrets live where.

What platform-side environment variable exposure looks like

Each of the October 2026 incidents followed a different path, but the customer consequence was the same: secrets stored by the platform on behalf of customers were exposed in bulk. The details below come from the providers' own disclosures.

Railway

Railway's preliminary report describes an attacker who attempted privilege escalation in build infrastructure, reached CI credentials, and ran an unauthorised query against encrypted environment variables, decrypting a subset. Because keys were envelope encrypted, Railway said it could not determine exactly which keys in each project or service were affected, and that at most 1.85 per cent of all workspaces, about 100,000, had environment variables potentially compromised. Railway rolled its own keys, storage bucket credentials and GitHub App installations, revoked all Railway access tokens, invalidated sessions, and asked upstream providers to revoke keys. See the Railway Breach 2026 analysis.

Zeabur

Zeabur's October preliminary report describes an attacker using Zeabur credentials to access its shared cluster, dedicated servers and platform database, with 3,218,965 service environment variable records confirmed exposed. Zeabur attributed the root cause to long-lived admin credentials stored in plaintext and usable from the internet, including cluster admin tokens with no expiry that had not been rotated after an earlier August incident. Zeabur asked all users to replace every credential in environment variables, revoking old keys first and then redeploying, and announced it will shut down on 31 December 2026. See the Zeabur Second Breach 2026 analysis.

Northflank

Northflank's status page told customers to assume all environment variables, including workload secrets, secret groups and global secrets, were decrypted or compromised, and said the attack appeared focused on secrets held in its control plane. Users reported unauthorised use of AI API keys stored on the platform on the same day. Northflank recommended rotating all secrets starting with AI provider keys, cloud credentials, payment keys, private keys and database or service credentials, and revoked its own tokens, sessions, VCS integrations and cross-account IAM roles. Customers on forward-deployed or dedicated control planes were reported unaffected. See the Northflank Breach 2026 analysis.

The common lesson

Encryption at rest did not protect customers once the attacker reached the systems that could decrypt. Environment variables on a PaaS are a convenience store for non-human identity credentials, and a provider-side compromise turns every one of them into a leaked secret at the same moment. Background on the pattern is in the Environment Variables and .env Files guide.

Phase 1: the first hour

The first hour sets the pace. Aim to finish these steps before anyone starts rotating individual keys.

  1. Read the provider's disclosure in full. Note the exposure window, what data stores were reached, whether the provider says to assume decryption, and which actions it has already taken (sessions invalidated, tokens revoked, Git apps rolled).
  2. Declare an incident. Give it an owner, a channel and a status cadence. A platform breach touches every team that deploys to the platform.
  3. Freeze changes that are not rotation. Stop routine deploys so that redeploys during rotation are traceable.
  4. Export the secret inventory. Pull the list of every project, service, environment and variable name from the platform API or dashboard, before you change anything. If the provider has revoked your platform tokens, sign in again and create a new short-lived token for the export.
  5. Put spend controls on the most abusable issuers. Set or lower budget limits on AI provider accounts and cloud billing alarms while rotation is under way. Northflank advised enabling budget limits and IP restrictions where available.
  6. Brief finance. Fraudulent AI usage and cloud spend are likely, and some providers asked customers to submit evidence of fraudulent spend.

Phase 2: triage the inventory

Classify every variable from the export. Names are usually enough to classify quickly; values should not be copied into spreadsheets or tickets.

PriorityCredential classWhy
1AI provider API keysAbused fastest for resale and compute; misuse appeared within hours in October 2026.
1Cloud provider credentials and cross-account rolesLead to wider infrastructure and data access, and crypto mining spend.
1Payment and billing API keysDirect financial and customer impact.
2Private keys, signing keys and JWT secretsAllow forging tokens and sessions; rotation forces user re-authentication.
2Database and cache passwords, connection stringsData access; often reachable if databases have public networking.
2Git provider, CI and container registry tokensSupply chain access to code and images.
3Third-party SaaS API keys (email, messaging, analytics)Abuse for spam and phishing, data exposure.
3Application encryption keysNeed planned re-encryption; see below.
4Non-secret configurationRecord and skip.

The ordering follows the priorities Northflank published and NHI Mgmt Group's view of how fast each class is abused. Within each priority, start with production. Assign each row an owner and a target time.

Phase 3: rotate at scale

The rotation sequence for each secret

  1. Revoke or disable the old credential at the issuer. Zeabur's instruction was to revoke old keys first and then redeploy. Where revoking first would cause an outage you cannot accept, create the new credential first, but revoke the old one within minutes, not days.
  2. Create the replacement with the narrowest scope the workload needs, and with an expiry if the issuer supports it.
  3. Update the value in the platform, or better, in a secrets manager the workload reads from.
  4. Redeploy so running processes pick up the new value; many runtimes only read environment variables at start.
  5. Verify that the old credential is rejected and the service is healthy.
  6. Record time revoked, time replaced and who did it.

Working at scale

  • Script it. Use the issuers' APIs to create and revoke keys, and the platform's API or CLI to set variables and trigger deploys. A script that rotates one service safely can then run across hundreds.
  • Use built-in rotation where offered. During its incident Northflank enabled secret rotation for managed Postgres and MongoDB, then MySQL, Redis, MinIO and RabbitMQ add-ons.
  • Deduplicate. The same key is often pasted into many services and environments. Rotate it once at the issuer and update every place it appears.
  • Handle shared secret groups carefully. A change to a group or global secret redeploys many services at once; schedule it.
  • Re-key signing secrets with a plan. Rotating a JWT or session signing secret logs users out. Decide whether to accept that or run old and new keys in parallel for a short, defined period.
  • Treat encryption keys separately. If an application encryption key was exposed, data encrypted under it must be re-encrypted, not just the key replaced.

The Secrets Rotation Runbook Template gives a reusable structure for each credential type.

Phase 4: beyond environment variables

Each provider's guidance went beyond variable values. Work through the following:

  • Platform access tokens and sessions. Railway revoked all Railway access tokens and Zeabur revoked platform access tokens; sign in again and recreate only the tokens you need, with short lifetimes.
  • Git provider integrations. Railway and Zeabur both advised checking GitHub audit logs and installed app access, and Northflank revoked VCS integrations. Review app installations, deploy keys and recent pushes.
  • Container registries. Railway advised checking registry audit logs, such as Docker Hub.
  • Databases inside the platform. Change passwords inside the database, not just the connection string. Zeabur advised checking PostgreSQL for unfamiliar roles, functions or jobs.
  • Public network access. Railway and Northflank both advised removing public access to databases and add-ons.
  • Managed servers. Where the provider had root access to servers it manages for you, Zeabur's advice was to treat them as compromised, back up and rebuild, or at least remove unrecognised SSH keys, change root passwords and replace all credentials on the server.
  • Workflow tools. Self-hosted automation tools store credentials of their own. Zeabur advised replacing the n8n encryption key and recreating n8n credentials.

Phase 5: hunt for misuse

Rotation stops future abuse; it does not tell you what already happened. For each high-priority credential, check the issuer's records for the exposure window the provider published, plus a margin either side.

  • AI providers: usage by key, unusual models, request volumes and spend. Northflank told customers to report suspicious AI usage to both the platform and the AI provider.
  • Cloud providers: audit trails for new users, keys, roles, instances or regions in use; billing anomalies. Zeabur asked users to review bills from the start of the exposure window.
  • Payment providers: new webhooks, refunds, payouts or API key creation.
  • Git and registries: new deploy keys, app installations, pushed commits and published images.
  • Databases: new roles, scheduled jobs and unusual export volumes.

Keep evidence of fraudulent spend, with timestamps and request details, to support claims with the platform and with issuers. Railway, for example, said it could not issue refunds for AI spend directly but asked for timestamps, prompts and proof of fraudulent spend.

Note that provider-initiated revocation notices do not by themselves prove a credential was misused. Railway stated that vendor revocation notices did not mean a customer's credentials were compromised. Treat them as a prompt to rotate and check, not as confirmation.

Phase 6: recover and harden

  • Move secrets out of platform storage. Use a secrets manager you control and inject at run time, so a platform database breach does not expose values.
  • Prefer short-lived, federated credentials. Workload identity federation to cloud providers removes static cloud keys from environment variables entirely.
  • Scope and cap keys. Per-service, per-environment AI keys with budget limits and IP restrictions limit blast radius.
  • Keep a live inventory. Maintain a map of which secrets live in which services so the next rotation starts from a list, not a search.
  • Review the provider. Ask for the final root cause report and decide whether the platform's control plane design, such as dedicated or customer-hosted control planes, meets your risk appetite. Zeabur's second incident came from admin tokens left unrotated after its first, so check whether fixes are complete.
  • Plan for exit. Zeabur's shutdown shows that a platform breach can end with a forced migration, so keep deployment configuration portable.

Hardening guidance for common platforms is in the Heroku, Netlify and Render PaaS Security Guide.

Common failure patterns

  • Rotating inside the platform only. Changing the variable without revoking at the issuer leaves the stolen value working.
  • Waiting for confirmation. When the provider cannot say which secrets were decrypted, waiting for certainty gives attackers time.
  • Forgetting to redeploy. Running processes keep the old value in memory until restart.
  • Missing copies. The same key in CI, local .env files and other platforms stays valid if not revoked at the issuer.
  • Ignoring non-variable access. Git apps, registry tokens, database roles and SSH keys on managed servers are left in place.
  • No spend controls. AI and cloud keys run up costs while rotation is still being planned.
  • Incomplete provider fixes. Trusting a provider statement that all keys were rotated without checking the follow-up reports.

Practitioner checklist

  • Read the provider disclosure and record the exposure window and stated scope.
  • Declare an incident with an owner and freeze non-rotation deploys.
  • Export the full variable inventory by project, service and environment.
  • Set budget limits and alarms on AI and cloud accounts.
  • Classify every variable and rotate in priority order: AI, cloud, payment, then keys, databases and integrations.
  • For each secret: revoke at issuer, replace with narrow scope, update, redeploy, verify, record.
  • Re-create platform tokens, review Git app installations, registry logs and database roles.
  • Remove public network access to databases and add-ons.
  • Hunt for misuse in issuer logs and bills across the exposure window and keep evidence.
  • Move secrets to a manager you control and adopt federated, short-lived credentials.
  • Run a post-incident review and update the rotation runbook.

Standards and references

Related NHI Mgmt Group resources: Vendor SaaS Breach Response Playbook · Secrets Rotation Runbook Template · Environment Variables and .env Files · Heroku, Netlify and Render PaaS Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.