IT NewsThe Hacker News

Railway Customer AI Keys Stolen, an Estimated US$740,000 Misused: How Businesses Should Manage API Keys

Cloud platform Railway says AI service keys stored by customers were stolen in an October breach, causing an estimated US$740,000 in unauthorised charges. We break down the incident and the key management points for businesses.

AI 密鑰被盜 估計損失 74 萬美元

Cloud platform Railway has disclosed that AI service keys stored by its customers on the platform (API keys, which you can think of as the "password" that lets software instruct an AI service on your behalf) were stolen in a breach in October, with an estimated US$740,000 in unauthorised use. Railway says that if the AI providers decline to refund the charges, the platform will absorb the costs itself.

This deserves the attention of Hong Kong businesses. Many companies now keep their AI keys on cloud platforms. Once a key leaks, the other party can use your account at your expense, and the first thing you notice is often the bill.

What Happened

What Was Stolen

Railway is a platform-as-a-service (PaaS, a cloud platform that helps customers build and run applications) provider. Customers' secrets, such as API keys and database credentials, are stored on the platform as environment variables (settings that a program reads while it runs).

According to Railway's incident report, the attacker decrypted variables in up to 1.85% of workspaces, roughly 100,000 variables, and the attacker's database queries were clearly looking for AI providers' keys. Note that 100,000 is only an upper limit: the platform logs show which environments were affected but not which specific variables.

Beyond AI keys, the decrypted data also included linked-account credentials for 1,852 users, namely BYOK proxy keys (BYOK means "bring your own key") and GitHub OAuth tokens. Railway says all of these have been reset, every user has been notified, and it has found no sign that anyone used the stolen credentials to log in to customer accounts.

In addition, one of the attacker's database queries also matched credentials for cloud, database and payment services. However, Railway's forensics show no customer databases were accessed and no sign that customers' code repositories were downloaded. The attacker also read the history of 353 builds, including the variables and secrets passed into those builds.

How the Attack Happened

According to the incident report, the attack began in Railway's build system. At 07:28 UTC on 20 October, the attacker exploited a previously unknown vulnerability to partly escape the file-system isolation of the build environment, read some files on the host virtual machine, and obtained a credential that a build server uses to push images and connect to internal systems.

This credential was meant only for build jobs, but the Temporal system that Railway uses internally to drive some build processes treated it as a trusted client. This let the attacker read parts of other builds' history and also obtain a copy of the company's internal monorepo (the codebase from which many services are deployed). Railway says the copy gave the attacker an understanding of how the platform works, helping them find vulnerabilities and move quickly between systems.

The attacker then found a misconfigured OIDC binding (one of the mechanisms deployment systems use to obtain short-lived cloud credentials) in one of the cloud environments. At 03:26 UTC on 21 October, the attacker exploited it to obtain credentials, and from there two more: one that could read encrypted variables in the production database over the internal network, and one SSH key. The SSH key opened a machine responsible for orchestrating tasks, which holds credentials able to decrypt customer variables because they are needed to start customer workloads.

Each environment's variables are encrypted with that environment's own key, and those keys are in turn encrypted by a root key held in the cloud provider's key management service (KMS). On 21 October the attacker first pulled the encrypted variables and looked for items whose names resembled AI keys, then used the orchestration machine's credentials to decrypt some of them through KMS. The attacker was fully removed from the systems at 09:24 UTC the same day. Railway also notes that these times differ from its preliminary report of 22 October.

Refunds

Refund arrangements depend on the AI provider:

  • AWS Bedrock, Google Gemini: Existing refund policies cover fraud, and account teams have started processing refunds.
  • OpenAI, SpaceXSI: Cases are reviewed one by one, and customers must submit claims to the provider.
  • Anthropic: Still under discussion; in the meantime the platform will bear the costs caused by stolen Anthropic keys.
  • OpenRouter: Its terms of service state that no refunds are given, so the platform will bear all related costs.

The report does not explain how the US$740,000 was estimated or what period it covers. It does not state any claim limit or deadline, nor whether customers must first pay disputed charges while reviews are under way. Railway believes the stolen credentials were used by services that resell or relay access to AI services for distillation, but it has not confirmed whether the attacker operated those services, and the attacker's identity has not been made public.

Railway has filed a complaint with the FBI's IC3 and is working with a specialist forensics firm, and the investigation is continuing. Analysis by Wiz researchers also says this incident was one of at least nine disclosed by AI development platforms in October, and that public reports describe attackers searching stored environment variables, especially those that can give access to AI services.

What This Means for Hong Kong Businesses

The key point is not "Railway had an incident" but where keys are stored and how they are used.

  • Companies using AI services in products or internal tools: AI keys are usually tied to usage, so once one is stolen, the charges go straight to your account.
  • Companies storing keys on third-party cloud platforms: If the platform is breached, the environment variables you store there may also be affected.
  • Teams that use one key in many places: When a single key is used everywhere, an incident means finding and replacing it system by system, and response takes much longer.
  • Refunds are not guaranteed: As shown above, providers' policies differ; some review case by case and some state outright that they do not refund. Railway says it will cover some of the costs this time, but that is the platform's decision, and businesses should not assume someone will always step in.

Railway also cautions that a key revocation notice from a provider does not necessarily mean your key was leaked. Out of caution, the platform handed over all keys for certain providers, so reset requests reached more than 100,000 users. There is no need to panic on receiving a notice, but follow up immediately.

What Businesses Should Do

  1. Set usage limits and budget alerts for every key: Configure limits and alerts on the AI provider's side so abnormal usage is spotted early, rather than waiting for the bill at month end.
  2. Rotate regularly and revoke immediately after an incident: Railway points out that a key must be revoked or rotated with the provider that issued it; simply filing a cost claim does not invalidate the key.
  3. One key per purpose: Do not use one key everywhere. Separate keys by system, environment or project, so the impact is limited and replacement is simple.
  4. Check surrounding access: Following Railway's recommendations, remove public network access to databases, review GitHub audit logs and the applications with access to your accounts, and check the audit logs of image registries such as Docker Hub.
  5. Clarify refund and liability arrangements in advance: Before using any AI service or cloud platform, check whether the terms include a refund mechanism, and how the platform stores and encrypts your keys.

How We Can Help

When choosing a cloud platform, look beyond price and performance. Ask how keys are stored, how permissions are separated and how you will be notified if something goes wrong. We provide Hosting & Business Cloud services, and can work with you to review how keys are stored in your current environment and streamline your permissions and rotation processes. If you would like to know whether your company's AI keys and cloud settings could be improved, please get in touch with us.

Related serviceHosting & Business Cloud

Source: The Hacker News

  • #APIKeySecurity
  • #AISecurity
  • #CyberSecurity
  • #CloudSecurity
  • #HongKongBusiness
  • #Railway