โ† Blog ยท Guides

Railway's environment-variable breach: could you rotate every secret today?

October 21, 2026

Update, 11 November 2026: Railway has published its final incident report (10 November 2026). The figures below are Railway's, about Railway:

  • "During the period of unauthorized access, the actor was able to chain various exploits, move laterally across multiple systems, and was ultimately able to obtain and decrypt a subset of customer variables, for at most, 1.85% (~100,000) of workspaces." That is Railway's upper bound, not a count of workspaces confirmed affected.
  • "The data the attacker was able to decrypt also included linked-account tokens (BYOK agent keys and GitHub OAuth tokens) for 1,852 users."
  • "The attacker also read the stored histories of 353 builds between 13:50 and 15:30 UTC on October 20th, sealed variables included."
  • "Our internal forensic investigation suggests AI provider keys were the primary target of the attack."
  • "Unauthorized spend on the stolen keys was estimated to reach ~$740,000."

Railway's response, in its words: "To protect our customers, we halted builds twice, at 17:03 UTC on October 20th and at 07:22 UTC on October 21st, rotated internal credentials, invalidated every user session and token at 20:19 UTC on October 21st, and restored builds for all plans by 22:49 UTC on October 22nd after significantly hardening our systems." Railway asks customers to rotate their credentials, AI provider keys above all, and to report unauthorized charges through the channels its report lists.

What the final report adds to the advice below: an AI provider key in an environment variable is closer to a wallet than to a setting. Set a spending limit for it at the provider, use a separate key for each project so one leak has one ceiling, and rotate it on a schedule rather than waiting for a headline. The rest of this article is kept as it was written on 21 and 22 October.

Originally published 21 October 2026, 23:10 UTC, while Railway's status page still listed the incident as "Identified" with builds paused.

Update, 22 October 2026, 22:49 UTC (Railway's own timestamp). Builds are back for every plan. From the status page: "Builds are now available for Free and Trial workspaces, alongside Hobby, Pro and Enterprise. Builds and deployments across all five plans are running at approximately normal speed. New signups remain temporarily paused while we focus on existing customers." The restore ran in stages: Enterprise at 03:32 UTC, Pro at 06:29 UTC, Hobby at 21:08 UTC, Free and Trial at 22:49 UTC, about nineteen hours end to end. The incident itself is still listed as "Identified" with the headline state "Major Outage". Railway's remediation guides are collected under Security Guides on its engineering blog.

Update, 22 October 2026, 08:04 UTC. The incident has moved since this post was written. Read directly from Railway's status page at that time, still listed as "Identified" with the headline state "Major Outage":

  • Every Railway API token has been invalidated (22 October, 04:17 UTC): "In accordance with our security disclosure, we have invalidated all Railway API tokens. If you are using an API token to integrate with Railway's Public API, it will no longer work. Please create new API tokens on Railway to continue using Railway's Public API." If anything you run talks to Railway's API, it has stopped working and needs a new token.
  • Builds are back for some tiers, not all. Enterprise first (03:32 UTC), then Pro (06:29 UTC). At 08:01 UTC: "Builds remain available for Pro and Enterprise workspaces. We are continuing to work on enabling builds for Hobby, then Free and Trial." Deployments that do run are slow: Railway says many "are taking longer than usual to start and may stay queued for some time", and asks customers not to trigger the same deployment more than once.
  • Railway has published 13 remediation guides (22 October, 01:22 UTC): rotating PostgreSQL, MySQL, Redis and MongoDB credentials; checking for anomalous AWS, GCP and GitHub access; checking for unexpected usage in Stripe, OpenAI, Anthropic, Grok and OpenRouter; and redeploying buckets and reconnecting GitHub after the credential reset. They are linked from the 01:22 UTC entry on the status page. Use Railway's guides rather than anyone's summary of them, ours included; they are still being updated. Four of them cover AI inference providers, which is consistent with Railway's own disclosure sentence about attacks aimed at "compromising AI inference providers". Two lines from the guides say why the order of the drill below matters. The AWS guide: "Access keys are long-lived, so an exposed key works until you deactivate it." The PostgreSQL guide: "If Public Access is enabled, the credential is usable from anywhere on the internet through the TCP proxy until you rotate." One reading to avoid: a guide for a credential type is Railway telling customers what to assume and check, not a statement that those credentials were taken. Railway's own position is still that the impact "may be limited to a subset of users".

The rest of this post is as first published at 23:10 UTC on 21 October, with one sentence in the closing section marked where the situation has changed.

On 21 October 2026 Railway published a security disclosure. In its words: "Earlier this morning, Railway detected anomalous activity involving systems that store customer environment variables." The key sentence, hedges included: "our investigation to date indicates that an unauthorized third party may have accessed encrypted environment variables and, for some of them, obtained the decrypted contents." Railway adds that "initial analysis suggests the impact may be limited to a subset of users."

Why that matters is in Railway's next line: "Environment variables may contain secrets such as API keys or database and registry credentials." Railway also places the event in a wider pattern: "We believe this is part of a series of attacks recently targeting platform companies with the aim of compromising AI inference providers."

Its recommendation to customers is blunt: "we strongly recommend that you immediately roll all environment variables, including any API keys, stored in Railway, as well as any private registry credentials, and review logs for those services for unusual activity." And the part that makes this hard: "All deployments are paused while we investigate." The status page spells out the consequence: new credentials cannot be deployed until builds come back.

The question this raises for everyone

You do not need to be a Railway customer for this to be useful. Every deploy platform, including ours, holds environment variables for you, and the day you need to rotate all of them is the day you find out how well you know what is in there. The honest question is simple: if you had to rotate every secret in your deploy platform today, how long would it take?

Most teams have never timed it. The usual answer, once someone tries, is "longer than we thought", because rotation is not one step. For each secret you have to find where it was issued, issue a replacement, update it in the platform, redeploy, and confirm the old one no longer works. Multiply by every service.

A rotation drill, in order

  1. List what the platform holds. Export or read every environment variable in every environment, including staging and preview ones. Note which are secrets and which are plain configuration.
  2. Write down what each secret can reach. A database password reaches your data. A payment API key reaches money. A registry credential reaches your images. This list is your blast radius, and it decides the order of the next step.
  3. Rotate from the highest reach down. Database and payment credentials first, then third-party API keys, then registry and deploy tokens. Issue the new value at the provider, update it in the platform, redeploy.
  4. Revoke the old values, don't just replace them. A replaced secret that still works is not rotated. Revoke at the issuing provider and confirm a request with the old value is refused.
  5. Read the provider logs. Railway's advice applies to any incident: look at each downstream service's logs for use you did not make. That is where a leaked secret actually shows up.
  6. Time it, then shorten it. Whatever the drill took, that is your exposure window in a real incident. Short-lived credentials, scoped keys and a scripted rotation path are what bring it down.

One lesson from Railway's timeline is worth sitting with. If rotation depends on redeploying, and the platform has paused deploys, you are stuck until it resumes. (Updated 22 October: deploys were paused for roughly a day and came back in stages; by 22:49 UTC they were available on every plan.) Rotating at the issuing provider, which revokes the old key immediately, is the step you can always take, and for a day it was the only one.

For the basics of where secrets should live and how to keep them out of code, see our guide Environment Variables and Secrets Management. For a previous platform incident and its lessons, see Vercel Security Breach 2026.

This piece makes no claims about Railway's customers beyond what Railway has published, and none about any other platform. Railway has said it will contact affected customers directly by email. If you host there, follow its status page and its instructions.

Sources: Railway, security disclosure, published 21 October 2026 20:44 UTC, modified 22:12 UTC; Railway status page, latest update 22:45 UTC. Both read 21 October 2026 at 23:10 UTC; status page re-read 22 October 2026 at 08:04 UTC and 23:14 UTC for the update blocks.