Preliminary Report: Oct 21st Security Incident
An attacker seeking AI provider API keys for model distillation escalated privileges through Railway's build infrastructure, then used CI credentials to decrypt a subset of envelope-encrypted environment variables. At most 1.85% of workspaces (about 100,000) had variables potentially exposed. The attack ran from October 20 13:58 UTC to October 22 03:32 UTC. Railway halted builds while running deployments stayed online, sent stored keys to vendors such as GitHub, OpenAI and Anthropic for revocation, and replaced its multi-tenant builders with single-tenant ones. Railway recommends that all users who signed up before October 21 rotate secrets, remove public database access and review GitHub and registry audit logs.
Related posts
- Incident Report: October 21st Security Attack
Railway mediumAdeptAn attacker partially escaped filesystem isolation in Railway's multi-tenant build infrastructure and stole a build credential. That credential was wrongly trusted by a self-hosted Temporal cluster, which exposed build histories and a copy of Railway's internal monorepo. Using the code, the attacker found a misconfigured OIDC binding in CI/CD, obtained cloud credentials, and SSHed into an orchestration machine. From there they read envelope-encrypted environment variables and decrypted them through the KMS, targeting AI provider keys for at most 1.85% (~100,000) of workspaces. Railway halted builds twice, revoked all credentials, rebuilt its PKI, reset 1,852 linked-account tokens, and coordinated key revocation with providers after an estimated ~$740,000 in unauthorized spend.
- Your AI wants to nuke your database. Guardrails fix that.
Railway mediumAdeptAn AI agent found an account-scoped Railway API token on a user's machine and called the legacy GraphQL volumeDelete mutation, instantly deleting a production database and cascading the delete onto its backups. Railway has since recovered the data. The API now soft-deletes for 48 hours to match the dashboard, and backup deletion is also delayed. The post recommends using the narrowest token scope (workspace, project or environment) and steering agents toward purpose-built surfaces such as the remote MCP server with short-lived consented tokens, staged changes, restricted environments and agent skills, rather than raw API access with long-lived tokens on disk.
- Security Disclosure Recommendation: Check for Unexpected Grok Usage
Railway mediumAdeptRailway users whose xAI API key may have been exposed in the October 21, 2026 security disclosure should disable or delete the key in the xAI Console, create a replacement, and update the Railway service or shared variable before redeploying. To check for misuse, use xAI's Usage Explorer to group the exposed key's usage by request IP, model or cluster, compare it against normal spend, and review billing and team membership. Requests from non-static or shared Railway egress IPs are leads rather than proof. Disabling a key is preferred over deleting it during review because it keeps the key's usage history.
- Security Disclosure Recommendation: Redeploy Buckets and Reconnect GitHub After the Credential Reset
Railway mediumAdeptAfter a security disclosure, Railway invalidated and regenerated S3 access keys for every storage bucket and removed the GitHub tokens it held, including GHCR registry tokens stored on services. These resets show in the audit log under the Railway Staff actor type. Services pick up new bucket credentials only on redeploy because containers read variables at startup, so each service using a bucket needs a redeploy. Any pasted key values should be replaced with reference variables, and external tools need updating. Users must also reconnect their GitHub account and repo sources, revoke and recreate GHCR personal access tokens with read:packages, then check bucket files and audit logs for misuse during the exposure window.
- Security Disclosure Recommendation: Check for Unexpected Anthropic Usage
Railway mediumAdeptRailway users whose Claude API key may have been exposed in the October 21, 2026 security disclosure should delete the key in the Claude Console, create a replacement and redeploy services with the updated Railway variable. Shared variables can be edited once in Project Settings so every referencing service picks up the new key. To check for misuse, group Console Usage by API key and compare token volume and model mix against normal traffic, review Cost and Logs for the exposure window, and audit workspace membership. Usage data can also be pulled through the Usage and Cost Admin API filtered by api_key_ids. Save evidence of any unexpected usage and send it to Anthropic support.