Back to Blog

Railway's Hackers Were Hunting AI Keys. Only the Crypto Wallets Couldn't Get a Refund.

Onuora Amobi·October 23, 2026
Security
Private Keys
Infrastructure
Wallets
AI
Railway's Hackers Were Hunting AI Keys. Only the Crypto Wallets Couldn't Get a Refund.

At 19:36 UTC on Wednesday, October 21, a wallet sweeper started emptying addresses across at least 19 EVM chains. By the time blockchain investigator Taylor Monahan finished counting, she had more than 500 transactions from over 200 addresses, worth about $371,000. The common thread, by her account: the private keys for those wallets had been sitting in environment variables on Railway, a cloud platform where developers deploy apps without running their own servers.

Railway did not publish its security disclosure until that evening. It said an unauthorized party "may have accessed encrypted environment variables" and, for some, obtained the decrypted contents. The company believes it was hit as part of a series of attacks on platform companies "with the aim of compromising AI inference providers." Analytics Insight's reconstruction puts the disclosure at about 21:51 UTC, more than two hours after the first theft.

The attackers came for AI keys. Crypto wallets were the collateral damage. And they were the only victims with no undo button.

The cloud host has quietly become crypto's custodian, and nobody priced it that way.

Railway has not confirmed Monahan's numbers or the link between the breach and the drains, and her count is an outside estimate. But the pattern is familiar enough that the burden of proof has shifted. Small crypto teams run trading bots, Telegram bots, relayers and payout scripts on platforms like Railway because it is cheap and fast. The easiest way to give a bot a wallet is to paste its private key into an environment variable. That is exactly the field Railway now tells every customer to rotate, even though its own analysis suggests only "a subset of users" was affected.

Every other secret in that vault had a reset button.

Look at what else lives in an environment variable and what happens when it leaks. A database password gets changed. A Stripe key gets rolled. A GitHub token gets revoked, which Railway did for everyone, according to its incident timeline, along with invalidating all Railway API tokens and rotating storage bucket credentials.

AI keys, the stated target, have the most forgiving recovery path of all. The same week, the AI coding tool OpenCode disclosed a breach of its hosted Console that exposed linked provider keys for 1.4% of its users. Developers woke up to spend alerts, some with more than $1,700 in overnight charges. Then the system worked the way centralized systems do. Anthropic and Google blocked the exposed keys, and OpenAI refunded API customers for credits used in the attack. Railway, for its part, says it notified upstream inference providers so they could revoke keys proactively.

A private key has no upstream provider to call. Once a sweeper signs a transaction, the money is gone, and the only remedy left is chasing it to an exchange. Onchain Lens reported a suspected attacker wallet sending funds to HitBTC, per Cryptoticker's tally, while noting the Railway link is unconfirmed. That is a forensics project, not a refund.

The contract won't cover it either.

Customers looking for recourse from the host itself will find thin ground. Cryptoticker read Railway's current terms of use and reports that they exclude consequential damages and data loss and cap other liability at $100 or the past twelve months of fees, whichever is higher. That clause is standard across cloud platforms. It was written for downtime and corrupted files, not for a field that doubles as a bearer instrument.

Railway also hasn't said how attackers got in, how many accounts were hit, or whether blockchain keys were among the decrypted values. CEO Jake Cooper told TechCrunch a post-mortem is coming. Railway's status page said early Friday that emails were still going out to "customers with a high likelihood of impact." For anyone whose bot wallet was drained Wednesday night, that email arrives more than a day after the money left.

Concede the industry's point: this is a small number.

The fair counterargument is that $371,000 barely registers in a year when Bitget lost hundreds of millions in a single exchange-wallet breach. Hot keys on a server are a known trade-off. Teams that store bot keys in environment variables know the risk and keep balances small. A sweeper hitting 200 low-balance addresses is closer to a pickpocket than a heist, and Railway's response, pausing deployments, invalidating tokens and telling everyone to rotate, was broadly what security teams are supposed to do.

All true, and it misses the shape of the problem. The amount was small because the attackers weren't after crypto. Railway says the campaign was aimed at AI providers. The wallets were swept because they happened to be in the same drawer, alongside an OpenAI key and a Postgres password. The next intruder who decrypts that drawer may not be so distracted, and the next platform may host a project's treasury signer or an oracle key instead of a tip bot.

That isn't hypothetical. CoinCentral's rundown of recent key compromises lists Ostium losing nearly $18 million in USDC in July through compromised oracle signing credentials, a leaked upgrade key behind a Syndicate Labs bridge breach in April, and a poisoned Injective developer package that harvested private keys. None of those were smart-contract bugs. Each was a secret stored somewhere a developer trusted.

Treat a private key like the only secret that can't be rotated.

The practical lesson is uncomfortable for anyone who prizes shipping speed. A bot's signing key should not live in the same plaintext field as its config. It belongs in a hardware module, a managed signer with spending policies, or at minimum a separate secrets manager the hosting platform can't decrypt on its own. The wallet itself should hold only what the bot needs for the next few hours, with the rest behind a multisig or a timelock the bot cannot touch. Exchange API keys should have withdrawals disabled and IP allowlists on. And funds that aren't meant to move at all, like team allocations and liquidity, belong in audited lock and vesting contracts rather than in any wallet whose key sits on a server.

None of that is new advice. What is new is the attacker profile. The current wave of platform breaches is being run, by Railway's account, by people farming AI access at industrial scale. They will scrape every secret on the way in, and crypto keys are the only ones that pay out instantly, irreversibly and without an invoice to dispute.

The AI companies can refund a stolen API credit. Crypto's whole design says nobody can refund a stolen key, and it's time the industry stopped storing those keys like they were API credits.

Share
Back to Blog