Your AI wants to nuke your database. Guardrails fix that.
An 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.
Related posts
- Preliminary Report: Oct 21st Security Incident
Railway easyNoviceAn 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.
- 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.
- The Hidden Ops Layer of Agent Platforms
Neon mediumAdept
Anything's Max coding agent gets a dedicated Neon database branch for every session, created in about 200 ms. The agent runs its migrations there and merges back into development atomically through Neon's restore API. Failed migrations go to a separate LLM "Migration Fixer" for up to three retries before rollback, and merges fail if the development schema changed in the meantime. After crashed sessions left 2,847 orphaned branches, the team added a 6-hourly cleanup job plus 24-hour expires_at timestamps on branches. Connection pooling and 0.25–1 CU autoscaling handle bursty workloads of about 30 peak connections.
- 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 Anomalous AWS Access
Railway mediumAdeptIf an AWS access key used with Railway may have been exposed, deactivate it, replace it, redeploy, and audit what it did. Create a second key on the IAM user and deactivate the old one rather than deleting it, so it can be briefly reactivated if a forgotten service breaks. Update the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables on Railway (or the shared variable once) and confirm the new deployment shows no InvalidClientTokenId or SignatureDoesNotMatch errors. Then search CloudTrail event history by access key in every Region for calls like RunInstances, CreateUser or PutBucketPolicy, check the IAM credential report and Cost Explorer, and delete attacker-created resources after snapshotting what you need for forensics.