CI/CD Build Isolation Failure Exposes Customer Secrets at Railway
Written by AI from the linked story. Not reviewed by an editor. How this works
An attacker exploited a partial build-isolation escape combined with an OIDC misconfiguration to pivot from Railway's build infrastructure into systems storing customer secrets, internal source code, and cloud credentials. The root cause was a combination of improperly scoped OIDC tokens and insufficient runtime isolation between build environments—meaning a compromise of one layer provided a viable path to sensitive data stores. This matters because CI/CD pipelines are high-value targets: they routinely touch secrets, cloud credentials, and production systems, yet are often treated as development-time concerns rather than security-critical runtime infrastructure. Up to 1.85% of customer workspaces had variables potentially decrypted, demonstrating that misconfigured identity federation and weak build sandboxing can have direct customer-facing consequences.
Tactical Insight
Immediate actions
- Audit all OIDC token configurations in CI/CD pipelines to ensure tokens are scoped to the minimum necessary audience, subject, and permissions.
- Rotate all secrets and customer variables that may have been accessible during the October 20–21 window.
- Enforce strict build-environment isolation so that one build job cannot read the filesystem, network namespace, or secrets of another.
Long-term improvements
- Implement runtime security monitoring (e.g., eBPF-based tooling) on build nodes to detect anomalous process execution or lateral movement attempts.
- Adopt a zero-trust model for internal service access from build infrastructure, requiring explicit authentication even for internal APIs.
- Regularly red-team CI/CD pipelines specifically for isolation-escape and credential-exfiltration paths.
Detection measures
- Establish alerting on any build process attempting to access secret stores or cloud metadata endpoints outside its declared scope.
- Maintain immutable audit logs of all secret-retrieval events, including which build, user, and timestamp initiated the request.
- Set anomaly thresholds on OIDC token issuance volume and flag out-of-band token exchange attempts for immediate review.