Roll every secret you stored in Railway

Railway: intruder may have read customer environment variables · Security incident · News · Railway · Oct 21, 2026

What happened

Railway said on 21 Oct that an unauthorized party may have accessed encrypted customer environment variables and, for some, obtained the decrypted contents. It paused all builds and deployments, told every user to roll all environment variables, API keys and private registry credentials, and later reset bucket credentials and stored GitHub tokens. Railway believes it is part of a series of attacks on platform companies aimed at AI inference providers.

How to prevent it

Any secret stored with a hosting platform is only as safe as that platform. Keep a list of every secret and where it lives, give each service its own key, set spend limits, and when a host reports a breach, rotate at the issuer, not just in the dashboard. See our API key guide.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I deploy apps on Railway and it has told users to rotate every environment variable after its 21 Oct 2026 security incident. Help me do this without breaking my apps. 1) Help me list every Railway project, environment and service I have, and for each, the names (not values) of the variables that are secrets: AI provider keys, database URLs, Stripe or email keys, OAuth secrets and registry tokens. 2) For each secret, tell me where it was issued and how to create a new one and revoke the old one there. 3) Give me an order to rotate them so my apps keep working, and remind me that new values only take effect after a redeploy once Railway builds are running again. 4) Show me how to check provider usage, billing and logs for anything unusual since 21 Oct. 5) Suggest a spend limit and a separate key per service going forward. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: leaked secrets & api keys

Secret keys placed in front-end code, mobile bundles or public repositories can be found by automated scanners and abused, often running up large bills on AI or cloud accounts before anyone notices.

A quick checklist before you ship

More on this: every leaked secrets & api keys story and our related guide.

Tools involved

Railway stories, OpenAI stories, Anthropic API stories

Related stories

Source: original post on News ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.