Back to Blog
Security22 October 20266 min read · 1,267 words

Railway Security Breach: Rotate Environment Variables Now

N7

No7 Engineering Team

Growth Architecture Unit

Security: Railway Security Breach: Rotate Environment Variables Now (illustration)

Update, 22 October 2026, 12:20 UTC: Railway reset bucket and GitHub credentials

Railway now says it has reset two credential types on customers' behalf, and it has published rotation guides for its database templates and for AI providers.

  • Storage buckets. According to Railway's reset guide, the ACCESS_KEY_ID and SECRET_ACCESS_KEY for every bucket in every environment were regenerated, and the old values no longer work. Containers read variables only at startup, so redeploy every service that uses a bucket.
  • GitHub. Railway invalidated the GitHub tokens it held for account connections and removed GitHub access tokens stored as registry credentials on services. Those registry tokens still work on GitHub until you revoke them, so revoke them on GitHub and reconnect GitHub to Railway yourself. The resets show in the workspace audit log with the actor type Railway Staff.
  • Databases. Railway's guides for PostgreSQL, MySQL, Redis and MongoDB use Regenerate in the Database View. For PostgreSQL, Railway says that if Public Access is enabled the credential is usable from anywhere on the internet until you rotate, and to remove public access if nothing outside the project needs it.
  • AI providers. Railway has guides for unexpected usage on OpenAI, Anthropic, Grok and OpenRouter: revoke the exposed key, deploy a new one and review usage and billing.

Update, 22 October 2026: AWS and Google Cloud key checks

Railway has published two more guides as part of its response. As of 11:47 UTC, the status page says deployment wait times are coming down, builds remain available for Pro and Enterprise workspaces, and Railway is working on Hobby, then Free and Trial.

  • AWS access keys. Railway's AWS guide says to create a replacement key, deactivate the exposed one, update AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in Railway and deploy, then review CloudTrail and billing for activity you did not generate.
  • Google Cloud service account keys. Railway's Google Cloud guide says to create a new key, disable the exposed one, deploy the new JSON and review Cloud Audit Logs. Tokens already issued from a disabled key stay valid for up to an hour, so disable the whole service account if you need to cut access immediately.

The Railway security breach is an incident Railway disclosed on 21 October 2026: an unauthorised third party may have accessed encrypted environment variables on the platform and, for some of them, obtained the decrypted contents. Environment variables often hold API keys and database and registry credentials. Railway recommends that every user immediately roll all environment variables stored in Railway, including API keys and private registry credentials, and review logs for unusual activity.

Railway security incident: what happened?

According to Railway's disclosure, it detected anomalous activity involving the systems that store customer environment variables. Railway believes it is part of a series of attacks recently targeting platform companies with the aim of compromising AI inference providers, and says it has notified those upstream providers to revoke keys proactively.

Railway's initial analysis suggests the impact may be limited to a subset of users, but it recommends the same precautions for everyone while it completes its review. It will email affected customers directly once it confirms which accounts were affected.

Railway status: are deployments paused?

Deployments were paused during the investigation. As of 11:47 UTC on 22 October 2026, the Railway status page reported that deployment wait times were coming down, though some deployments may still take longer than usual to start, and that builds remained available for Pro and Enterprise workspaces, with Hobby, then Free and Trial to follow. Railway asks users not to trigger the same deployment more than once. Railway's disclosure does not say whether already running services were affected; check the status page for the current state before you plan a rollout.

What should Railway users do now?

  1. Rotate every secret stored in Railway. Treat all environment variables as exposed: payment keys, database passwords, registry tokens, AI provider keys, OAuth client secrets and webhook signing secrets. Create the new credential at the provider, update Railway, deploy, then revoke the old one. If your plan cannot deploy yet, keep the old credential alive only until the new one is deployed.
  2. Update Railway and deploy the change. In Railway, variable edits are staged changes: nothing reaches running services until you click Deploy, which redeploys every affected service. From the CLI, railway variable set sets a value and triggers a redeploy; add --skip-deploys to stage several changes and deploy them once. Railway's credential rotation guide covers rotating without downtime.
  3. Check for misuse. Review provider logs and dashboards for activity you do not recognise, starting with anything that moves money or customer data.
  4. Expect revoked AI keys. Railway says it notified upstream AI inference providers to revoke keys proactively, so check whether any AI provider keys stored in Railway still work, and replace them if they do not.

Is Railway safe to use after the breach?

Railway's initial analysis suggests the impact may be limited to a subset of users, and it says it will email affected customers and post updates as it narrows the scope. Until it publishes its findings, nobody outside Railway can say more. What matters for you today is the same whether you stay or move: any secret that was stored in Railway should be treated as exposed. Moving to another host does not undo that, so rotate first and make any hosting decision afterwards.

Stripe keys: rotate first, investigate second

For stores and SaaS apps, we would rotate Stripe keys first. Railway's Stripe guidance quotes Stripe's rule that a key that reached a public repository or a log line is treated as compromised even without evidence of use, and applies it here: rotate first, investigate second.

  • Rotate the secret or restricted key. In the Stripe Dashboard, rotate the key on the API keys page. Stripe lets you set a delayed expiration of up to 7 days on the old key. Use that only to bridge the gap until you can deploy the new key, keep it as short as possible, and expire the old key as soon as the new one is live.
  • Roll webhook signing secrets. If a webhook signing secret was stored in Railway, roll it too. Stripe lets you delay the old secret's expiration for up to 24 hours while you update your server.
  • Move to restricted keys. Stripe's API key documentation recommends restricted keys with only the permissions an integration needs, which limits the damage if a key leaks again.
  • Review the account. Look for charges, refunds, payouts or connected accounts you do not recognise, and check the request logs for calls your app did not make.

Shopify apps and headless stores on Railway

If a Shopify app or headless storefront runs on Railway, its client secret and access tokens may have been in its environment. Shopify's credential management guide explains how to rotate a client secret in the Dev Dashboard. For routine rotation it replaces stored access tokens before revoking the old secret, to avoid downtime. If a secret is actively being misused, Shopify says to revoke the exposed secret immediately, accepting that merchants lose access until the new one is in place. Our Shopify app development team can help rotate app credentials safely.

What to do next

Make a list of every secret your Railway services use and rotate them today, Stripe and database credentials first. Deploy the changes once builds are available for your plan, then watch provider logs for a few days. If you also run PHP or Node.js, patch those runtimes too: the PHP2Shell and Node.js security release fixes came out the same day.

Frequently Asked Questions

The questions buyers and engineers ask us most about this topic.

What happened in the Railway security breach?

On 21 October 2026 Railway disclosed anomalous activity on systems that store customer environment variables. An unauthorised third party may have accessed encrypted variables and may have obtained the decrypted contents of some. Railway recommends all users roll every environment variable and review logs.

Should I rotate my Stripe keys after the Railway breach?

Yes, if a Stripe key was stored in Railway. Railway's guidance follows Stripe's rule to rotate first and investigate second: rotate the key in the Stripe Dashboard, roll webhook signing secrets, and check for charges, refunds or payouts you do not recognise.

Are Railway deployments paused after the security incident?

Deployments were paused during the investigation. As of 11:47 UTC on 22 October 2026, deployment wait times were coming down and builds remained available for Pro and Enterprise workspaces, with Hobby, Free and Trial to follow. Check status.railway.com for the current state.

Is Railway safe to use after the breach?

Railway says its initial analysis suggests the impact may be limited to a subset of users and that it will email affected customers. Whether you stay or move, treat every secret stored in Railway as exposed and rotate it; moving to another host does not undo the exposure.

Did Railway reset any credentials itself?

Yes. Railway says it regenerated the S3 credentials for every storage bucket and invalidated the GitHub tokens it held, removing GitHub tokens stored as registry credentials. Redeploy services that use buckets, revoke those registry tokens on GitHub and reconnect GitHub to Railway.

What should I do with AWS or Google Cloud keys stored in Railway?

Railway's guides say to create a replacement key, deactivate or disable the exposed one, deploy the new key and review CloudTrail or Cloud Audit Logs. Google Cloud tokens already issued from a disabled key stay valid for up to an hour.