Rotate Everything: Railway's Environment-Variable Breach Puts AI Inference Keys in Play

On 21 October 2026, the deployment platform Railway disclosed that it had detected anomalous activity that morning in the systems storing customer environment variables. The company's wording is careful and deserves quoting in full: investigation to date indicates an unauthorized third party may have accessed encrypted environment variables and, for some of them, obtained the decrypted contents. Environment variables, Railway notes, may contain API keys, database credentials, and private registry credentials — the entire secret plane of every affected project. While initial analysis suggests the impact may be limited to a subset of users, Railway is recommending all users rotate everything as a precaution, and it has paused all deployments while the investigation runs.

The sentence that makes this an AI-security story rather than a generic platform incident is Railway's own assessment of motive: “we believe this is part of a series of attacks recently targeting platform companies with the aim of compromising AI inference providers” — and the company says it has notified those upstream providers to revoke keys proactively. That is a vendor telling you, on the record, that the credential class the attackers want is the one that buys inference: the API keys that flow from thousands of Railway projects into model providers. Read it alongside yesterday's LiteLLM 1.107.0 compromise, where the payload's first job was harvesting AI-provider credentials off developer machines, and a pattern hardens: AI inference keys are now a primary theft target at every layer of the stack — the proxy library, the developer laptop, and now the hosting platform's secret store. The ConnectWise campaign showed what state-aligned actors do with valid application credentials at machine speed (2,900 attempts a minute, per Microsoft); keys that authenticate to inference providers are the same shape of asset, minus the Conditional Access policies most tenants never extended to them.

What Railway has and has not said

Credit where it is due: the disclosure is fast (same-day), plain-spoken about the worst case (decrypted contents, not just ciphertext), and explicit that absence of evidence is not clearance — hence the rotate-everything guidance even for users outside the suspected subset. What is missing is everything that would let anyone scope exposure independently: no attack vector, no dwell time, no indication of how the encrypted store was reached or how decryption was achieved for “some” variables, and no list of which accounts are affected (those customers are to be contacted directly by email). The “series of attacks targeting platform companies” claim is Railway's assessment, carried here as vendor attribution — no corroborating disclosure from another platform or provider was cited in the post we read, and none should be assumed until one appears.

Operationally, the sharpest edge is the deployment freeze: until builds are restored, no new versions can ship — which means no rotating secrets through a fresh deploy on the normal path, and no shipping fixes for anything else either. Teams whose incident response depends on deploying (new images without the exposed secrets, rotated-config releases) need to plan around the freeze rather than through it, and to treat the window between “we detected anomalous activity” and “deployments paused” as live exposure time for any key that was valid then.

Railway's own detection guidance is unusually good — use it

On 22 October Railway started publishing the follow-through: engineer Mykal Machon posted anomalous-access checklists for GCP service-account keys and AWS access. The GCP guide, which we read in full, is the rare vendor incident page that teaches the right primitive: service-account keys do not expire by default, so an exposed key works until you disable it. It walks through disabling the key via gcloud iam service-accounts keys disable (the console cannot disable keys), warns that already-issued short-lived tokens stay valid for up to an hour — so cut off immediately by disabling the whole service account or applying an IAM deny policy, then wait 60 minutes before re-enabling — and tells readers to strip unrecognized IAM roles, particularly Service Account Token Creator on other accounts, which is exactly the privilege an attacker mints for persistence. Railway-specific operations (multiline JSON variables, shared-variable propagation on redeploy) are covered inline. If your estate touches GCP through Railway, that page is your runbook; the AWS companion covers the other half.

What to do

  • Roll every secret stored in Railway, now — not after the scope email. All environment variables including API keys, database credentials, and private registry credentials, per Railway's own recommendation. Assume the decrypted-contents worst case until your account is affirmatively cleared; reissue from the provider side first so old values die even if a copy survives somewhere.
  • Treat inference-provider keys as the priority rotation queue. OpenAI, Anthropic, and every other model-provider key that ever lived in a Railway variable should be revoked and reissued first — Railway has told you these are the target — then review usage dashboards and audit logs at each provider for consumption you did not generate.
  • Hunt the persistence, not just the secret. Check Cloud Audit Logs (GCP) and CloudTrail (AWS) for the exposed identities, look for unrecognized IAM grants — especially token-creation rights on other accounts — and review for resources or charges you do not recognize. An attacker holding a service-account key for even an hour can mint the next credential in the chain.
  • Plan around the deployment freeze. With all Railway deployments paused, pre-stage rotated configs and images so they ship the moment builds resume, and do not let the freeze become the reason rotation waits: provider-side revocation works independently of deploying.
  • Generalize the lesson off Railway. Any platform that centrally stores your env vars — preview environments, CI secret stores, internal developer platforms — is the same single point of failure. Inventory where production inference keys exist outside a secrets manager with audit logging, and shrink that list; the “series of attacks targeting platform companies” framing, if accurate, means the next disclosure will name a different platform with the same architecture.

Our write-up is analysis of Railway's published disclosure and response guides; we did not independently verify the intrusion, contact affected systems, or confirm the “series of attacks” assessment. Secondary details (deployment-pause mechanics, key-revocation outreach) are reported via press coverage of the same disclosure, not independently confirmed.

Sources: