Railway breach: rotate secrets
Railway says stored secrets may have been exposed. Rotate credentials at each provider, update Railway, redeploy, and review provider logs.
By ShipSecurely Editorial · Updated · How we make these guides
Shows up in: Railway
What it is
On October 21, 2026, Railway disclosed that an unauthorized third party may have accessed encrypted customer environment variables and, for some of them, obtained the decrypted contents. Its preliminary report, dated October 22, says "at most 1.85% of all workspaces had some environment variables potentially compromised", or about 100,000 workspaces.
What to do: rotate each secret at the service that issued it (Stripe, Supabase, OpenAI, your database, your package registry), then put the new value in the Railway variable and redeploy. Changing the value in Railway alone does not revoke the old key. Then check each provider's logs for use you do not recognize. The order is under How to fix below.
What did Railway say happened?
Railway's security disclosure, dated October 21, begins: "Earlier this morning, Railway detected anomalous activity involving systems that store customer environment variables." Its 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 notes that environment variables may contain secrets such as API keys or database and registry credentials. It says it believes this is part of a series of attacks recently targeting platform companies with the aim of compromising AI inference providers, and that it has notified those upstream providers to revoke all keys proactively.
The disclosure says Railway's initial analysis suggests the impact may be limited to a subset of users, but that Railway recommends all users act as a precaution while it completes its review: immediately roll all environment variables stored in Railway, including any API keys, as well as any private registry credentials, and review the logs for those services for unusual activity. As Railway confirms which accounts were affected, it says it will contact those customers directly by email with additional details. At the time of the post, all deployments were paused while Railway investigated, so new versions could not be rolled out until builds were restored.
Railway's status page linked the disclosure at 2:59 PM PT on October 21 and said deployments remained paused, including for Enterprise customers. Later updates on the same page say:
- At 3:10 PM PT on October 21, Railway said it was rotating all bucket credentials, that new credentials would appear automatically in the dashboard, and that services would need a redeploy once builds resumed. At 3:37 PM PT, it said rotation was continuing. At 5:22 PM PT, it said it was still working to restore builds and would publish guides shortly.
- Railway linked its own step-by-step guides for rotating PostgreSQL, MySQL, Redis, and MongoDB credentials, for redeploying buckets and reconnecting GitHub after the credential reset, and for checking OpenAI, Anthropic, OpenRouter, Grok, and Stripe for unexpected usage and GitHub, AWS, and GCP for anomalous access (6:22 PM PT, October 21).
- Builds came back for Enterprise workspaces at 8:32 PM PT and for Pro workspaces at 11:29 PM PT on October 21.
- Railway invalidated all Railway API tokens. A token used with Railway's Public API no longer works, and you need to create a new one (9:17 PM PT, October 21).
Builds came back on every plan on October 22, and on October 23 at 3:06 PM PT Railway marked the incident resolved, saying builds, deployments, the Railway API, and the dashboard were operating normally, with new signups still temporarily paused. The status page has the current state.
What does Railway's preliminary report add?
Railway's preliminary report, dated October 22 and written by Jacob Cooper and Angelo Saraceno, says its forensic investigation is still ongoing and that a follow up will come as the investigation concludes. Its main points:
- When. Railway believes the attack took place "from October 20th 13:58 UTC to October 22nd 03:32 UTC". That is 6:58 AM PT on October 20 to 8:32 PM PT on October 21. The report says the final timestamp is when Railway confirmed the attacker no longer had access to any internal systems. So the attack started the day before the October 21 disclosure was published.
- What the attacker wanted. The report says the attack was "attempting to obtain AI provider API keys to perform distillation attacks".
- How many workspaces. Railway says "at most 1.85% of all workspaces had some environment variables potentially compromised", which it puts at "about 100,000 workspaces". Its timeline describes an unauthorized query of encrypted environment variables, "of which a subset were decrypted". Railway says it was unable to know which variables specifically were decrypted.
- Who Railway is contacting. The report says Railway has notified the customers that were directly impacted, and is also reaching out to customers it considers high risk, a group larger than the 1.85% of workspaces. On October 23, the status page said Railway had finished notifying users whose workspaces met its criteria for increased risk, and that workspaces outside those groups are not confirmed safe from compromise.
- Vendors. On October 21, Railway notified vendors, and "Vendors were requested to revoke all keys for their service". The report names GitHub, GitLab, Anthropic, OpenAI, OpenRouter, SpaceXSI, and Stripe among the vendors it worked with to revoke the potentially compromised keys. It says the number of users hit by those vendor reset requests was larger than 100,000, and that a revocation notice from a vendor does not by itself mean your key was impacted.
- Accounts and source code. The report says: "The attacker did not access Railway user accounts as part of this incident." On source code, Railway says it is "not ruling out that they accessed user source code" and will confirm in its final forensic investigation report.
- What Railway recommends. Railway recommends that "all customers who signed up prior to October 21 rotate their keys stored on Railway". Its list of recommendations for all customers is to remove public network access to databases, rotate any sensitive variables and keys, check GitHub account audit logs and review all app access, and check audit logs in registries such as Docker Hub. Each one is in the steps under How to fix.
Am I affected if Railway has not emailed me?
You may be. Railway's preliminary report says it has notified the customers that were directly impacted, and is also reaching out to customers it considers high risk. It also says it was unable to know which variables specifically were decrypted, and it recommends that all customers who signed up prior to October 21 rotate their keys stored on Railway. Treat every secret you kept in a Railway variable as possibly read, and rotate it, whether or not an email arrives.
How to check in 5 minutes
In the Railway dashboard, open each project, then each environment, including pull-request environments, then each service's Variables tab. Write down every variable name that holds a credential: API keys, access tokens, passwords, connection strings such as
DATABASE_URL, private keys, OAuth client secrets, and signing or webhook secrets. Include project-level shared variables.Include sealed variables. Railway's variables docs say that when a variable is sealed, "its value is provided to builds and deployments but is never visible in the UI nor can it be retrieved via the API." Railway's disclosure and preliminary report do not mention sealed variables. The disclosure recommends that you "immediately roll all environment variables, including any API keys, stored in Railway", and we read that as including sealed ones. Identify each sealed value by name and by the key you see in the provider's own dashboard.
Next to each name, write the provider that issued it and every other place the same value is used: another host, a CI secret, a teammate's local
.env. A reused value has to be replaced in all of those places.List anything that deploys to Railway with a Railway API token, such as a CI job. The status page says Railway invalidated all Railway API tokens and that a token used with Railway's Public API no longer works, so create a new token for that job.
Sort the list into the order under How to fix. That is your rotation plan.
How to fix
Railway
Work one credential at a time. Rotate at the provider first and keep the old key working for a moment, then put the new value in the Railway variable, then redeploy. Revoke the old key at the provider once the new deployment works. Changing the value in Railway alone does not revoke the old key, so anyone holding the old value can keep using it until you revoke it.
- Every environment variable and API key stored in Railway. Go service by service and environment by environment, including pull-request environments and shared variables. Railway's disclosure recommends that you immediately roll all of them, including any API keys, as well as any private registry credentials. Its preliminary report recommends that "all customers who signed up prior to October 21 rotate their keys stored on Railway". Its user remediations section, pointing back to the October 21 disclosure, says "we recommend all users revoke and reapply sensitive environment variables stored on Railway prior to this date", meaning before October 21. A value that is not secret, such as a public site URL or a feature flag, can stay.
- Database passwords and connection strings. For a database Railway hosts, change the password on the database itself, then update every variable that holds that password or a connection string built from it, in every service that references it. For a database hosted elsewhere whose URL was in a Railway variable, such as a Supabase project or a managed Postgres, reset that database user's password at the host. On Supabase, the database password is reset in the project's database settings. Then update the Railway variable.
- Public network access to databases. Railway's preliminary report advises all customers to "Remove public network access to databases". Do it for each database Railway hosts for you, after you change its password in step 2.
- Private registry credentials. Revoke and reissue the tokens Railway uses to pull private packages or images: an npm token, a GitHub token for GitHub Packages or the container registry, a Docker Hub access token. The disclosure names private registry credentials specifically.
- Third-party tokens stored in Railway.
- Stripe: roll the secret key and any restricted keys in the Dashboard's API keys page. Roll the signing secret of each webhook endpoint whose secret was in a Railway variable.
- Supabase: create a new secret key, replace the old one everywhere, then delete the old secret key or deactivate the legacy
service_rolekey, as the API keys guide describes. Reset the database password too (step 2). - OpenAI, Anthropic, and other model providers: create a new API key in the provider's console, then delete the old one. Railway's disclosure says it notified upstream AI inference providers to revoke all keys proactively, so a model key may already have stopped working. Replace it either way. The preliminary report says the attack was "attempting to obtain AI provider API keys to perform distillation attacks", and that a revocation notice from a vendor does not by itself mean your key was impacted.
- OAuth client secrets, such as a Google or GitHub sign-in app: generate a new client secret in that provider's developer console, then delete the old one.
- Webhook signing secrets from other services: roll each one in that service's dashboard. Your own session or JWT signing secret: replace it too. That signs every user out, which is expected.
- Check each provider for unusual use. Railway's disclosure recommends that you review logs for those services for unusual activity. In Stripe, Supabase, your model provider's usage page, your database's connection logs, and your registry, look for requests, new keys, new users, or spend you do not recognize. Start at least from October 20, and look further back if the provider keeps the logs. Railway's preliminary report says it believes the attack began at 13:58 UTC on October 20, which is 6:58 AM PT. The report also advises all customers to "Check your GitHub account audit logs and review all app access" and to "Check audit logs within your registries such as Dockerhub". Our advice, not Railway's: revoking the old key stops further requests using that key, but it does not tell you whether someone already used it. Check your AI provider's usage or billing page for October 20 to 22 for requests or charges you do not recognize.
- Redeploy so each service picks up the new values. A running deployment keeps the values it started with. That includes Railway storage bucket credentials: the status page says Railway is revoking all existing ones, new credentials appear in your dashboard automatically, and services need a redeploy to pick them up. Builds are back on every plan, and Railway marked the incident resolved on October 23. Check the status page for the current build and deploy state by plan. Earlier updates asked users not to trigger the same deployment more than once, to avoid adding to the wait. If you cannot redeploy yet, you can still revoke the old key at the provider now. That stops anyone using the old value, and the service that uses it fails until it can redeploy with the new one. Decide key by key whether that downtime is worth it.
Copy the fix prompt
Paste this into Cursor, Lovable, Bolt, or Claude Code. Read the diff before you merge it.
You are helping me rotate secrets after Railway's October 21, 2026 security disclosure. Do not add features. Do not print, log, or commit any secret value. 1. List every environment variable my code reads: process.env.*, import.meta.env.*, and any config file that loads env, including Dockerfiles, railway.json or railway.toml, and CI workflows. 2. For each one, say whether it is a credential (API key, access token, password, database URL with a password, private key, OAuth client secret, signing or webhook secret) or a value that is not secret. 3. For each credential, name the provider that issues it and where in my code it is used. 4. Output a table: variable name, provider, where it is used, and the rotation order: Railway variables and API keys, then database passwords and connection strings, then private registry credentials, then third-party tokens, then signing secrets. 5. Flag any credential that also appears in another host, a CI secret, or a committed file, because it has to be replaced there too. Do not call the Railway API or CLI, and do not change environment variables. I will rotate each key at the provider and update Railway myself.
Questions
Did Railway say my project was affected?
Railway's preliminary report says it has notified the customers that were directly impacted, and is also reaching out to customers it considers high risk. It says "at most 1.85% of all workspaces had some environment variables potentially compromised", or about 100,000 workspaces, and that it was unable to know which variables specifically were decrypted. It recommends that all customers who signed up prior to October 21 rotate their keys stored on Railway. No email is not a reason to skip the rotation.
Is changing the value in Railway enough?
No. The old key keeps working at the provider until you revoke it there. Create the new key at the provider, put it in Railway, redeploy, then revoke the old key. A database password has to change on the database itself.
Builds are paused on my plan. What can I do now?
Rotate and revoke at the provider anyway. A revoked key is useless to anyone who copied it, even before your service has the new value. The service that uses it fails until you can redeploy, so start with the keys where an outage costs less than misuse would. Builds came back on every plan on October 22, and Railway marked the incident resolved on October 23 (see the status page). Railway's preliminary report says: "At time of writing, builds for all tiers are restored." Check the status page for the current build and deploy state by plan.
Sources
Related
Guides
Need someone to fix it for you? See /help.
The weekly fix
The weekly fix: 3 real security mistakes in vibe-coded apps and how to fix them, every Tuesday.