Delinea Blog > Railway: When a build credential becomes access to customer secrets

Railway: When a build credential becomes access to customer secrets

Published November 2026
Read time 6 minutes
What you will learn
Railway’s incident shows how a limited-purpose build credential, excess trust between services and a misconfigured OIDC binding led to decrypted secrets, and how to limit decryption access and credential lifetimes. 

On November 10, Railway published a detailed report on its October security incident, which exposed customer secrets and led to an estimated $740,000 in unauthorized AI API usage.

The attack began with a vulnerability in Railway's build infrastructure and moved through several internal systems before reaching encrypted customer environment variables.

The attacker obtained a credential intended for a limited purpose and exploited weaknesses in trust between services

Railway estimates that environment variables in up to 1.85% of its workspaces, approximately 100,000, could have been decrypted. This represents the maximum potential exposure, not the confirmed number of compromised workspaces. The attacker also obtained linked-account tokens, including GitHub OAuth tokens and AI agent keys, belonging to 1,852 users. Railway has reset those tokens.

The attacker didn't start with a compromised administrator account. Instead, it obtained a credential intended for a limited purpose and exploited weaknesses in trust between services to gain access to increasingly sensitive systems.

From build isolation to internal access

The attacker began creating dummy accounts on October 18. On October 20, it exploited a previously unknown vulnerability in Railway's multi-tenant build infrastructure, partially escaping filesystem isolation and reading files from the underlying host.

One of those files contained a credential used by build servers to authenticate to internal systems, including the container registry. The credential was supposed to authorize only operations needed to complete builds.

However, Railway's internal Temporal instance also accepted it as a trusted client. Temporal was used to schedule and run asynchronous tasks, including parts of the build process. Through its APIs, the attacker retrieved stored build histories containing build variables and other information.

The same credential also allowed access to cached repository snapshots. One of the retrieved builds belonged to an internal Railway service, granting the attacker access to a copy of the company's internal monorepo.

The build credential was accepted by a service it wasn't intended to access. The source code then gave the attacker visibility into Railway's internal architecture and additional opportunities to escalate.

The second trust boundary

Railway detected suspicious activity within hours and revoked the compromised build credential that evening. The attacker already had the source code.

Using information found in the codebase, the attacker identified a misconfigured OpenID Connect (OIDC) trust binding in Railway's cloud environment. On October 21, this allowed it to obtain a short-lived cloud credential intended for the company's CI/CD infrastructure.

That credential provided access to additional internal secrets, including an SSH private key and a longer-lived credential that, when combined with internal network access, could be used to read encrypted environment variables from the production database.

The attacker used the SSH key to connect to a machine responsible for orchestration tasks. That machine had access to the production database network and stored another long-lived credential used to decrypt customer environment variables.

The attacker now had the credentials needed to access the production database and decrypt customer secrets. Revoking the build credential stopped that access, but the attacker had already obtained the source code, exposing the next path into Railway's environment.

Encrypted secrets were not enough

Railway protects customer environment variables using envelope encryption. Each environment has its own data encryption key, which is protected by a root key held in an upstream cloud provider's key management service.

The attacker didn't need to break this encryption. It had obtained credentials that allowed it to retrieve encrypted variables from the database and request their decryption through the legitimate key management service.

On October 21, the attacker retrieved encrypted environment variables and decrypted a subset of them. Database logs show that it prioritized AI provider API keys, searching for variable names that matched specific patterns. Another query also matched cloud, database, and payment service credentials.

Railway believes the primary objective was to steal AI provider keys for resale and use in model distillation. The company estimates that unauthorized use of the stolen credentials resulted in approximately $740,000 in losses.

Railway also points to similar thefts disclosed by OpenCode, Warp, Fireworks AI and other platforms between October 6 and 23. It assesses the incident as part of a broader series of attacks targeting platforms that hold AI keys.

Railway reported no evidence of customer repository downloads, customer database access or logins to Railway accounts using credentials stolen during the incident.

Encryption was not defeated, and Railway's per-environment design helped limit potential exposure. But the attacker had obtained credentials authorized to request decryption. The key management service was performing legitimate operations on behalf of a compromised identity.

Did AI change the attack?

Railway describes the incident as a contest of agent speed. According to its report, the attacker used AI models with safety restrictions removed and, based on Wiz's assessment, an orchestration framework similar to ARTEX. The attacker explored multiple paths in parallel, and access to Railway's source code made that process more effective.

The report doesn't establish exactly which actions were autonomous or how much human direction was involved. What it does show is an attack that was dependent on familiar weaknesses: excessive trust between services, a misconfigured identity binding and privileged credentials accessible from compromised infrastructure. AI may have accelerated the attack, but the permissions and trust relationships were already there.

What this means for identity security

The initial build credential was intended for a limited function, but another internal service trusted it more broadly. This is why service identities need the same scrutiny as privileged human accounts. It's not enough to review what a credential was issued for; organizations also need to understand where it is accepted and what those systems allow it to do.

The OIDC misconfiguration is another example of why short-lived credentials aren't enough on their own. The attacker used a temporary cloud credential to retrieve longer-lived credentials and an SSH key. Its expiration time didn't matter much once those credentials were obtained.

The decryption stage also shows the limits of protecting secrets only at rest. Railway's encryption was working as designed, but the attacker had reached a workload with credentials authorized to decrypt customer variables. The most important parts of secrets management are:

  1. limiting which identities can request decryption.

  2. restricting access to specific secrets.

  3. reducing the lifetime of privileged credentials.

Build systems, CI/CD pipelines, deployment tools and orchestration machines also need to be treated as part of the privileged access environment. They may not look like traditional administrative systems, but they often hold credentials that can be used in production.

Railway says it has closed the exploited weaknesses, rotated affected credentials and moved builds to dedicated ephemeral virtual machines. It has also introduced more narrowly scoped credentials, stronger separation between internal services and additional controls around secret decryption.

Why individually protecting credentials isn’t enough

Railway's incident wasn't caused by a single overly privileged account. It was a chain of credentials, each giving the attacker access to another system or another identity.

The initial vulnerability gave the attacker a foothold, but the trust between services determined how far it could go. Even encrypted customer secrets became accessible once the attacker obtained credentials with the authority to decrypt them.

Railway has addressed the specific weaknesses involved. The broader problem is familiar: credentials are often protected individually, while the access they provide across connected systems receives less attention.

Thanks to Railway’s very detailed analysis, every defender has a real attack chain to test their own environment against. That's the kind of openness our industry should reward. If you ever end up in Railway's shoes, publish as they did. The rest of us will be better for it.

Related Topics