Back to all lessons
Awareness Lessons
2 months ago

Compromised Registry Infrastructure Delivers Credential-Stealing Terraform Modules

Written by AI from the linked story. Not reviewed by an editor. How this works

Attackers gained unauthorized access to Coder's Cloudflare infrastructure and injected malicious servers into its module registry, turning a trusted software distribution channel into a credential-theft vector. This is a classic supply chain attack: users who believed they were consuming legitimate Terraform modules were instead executing code designed to exfiltrate API keys, CI/CD secrets, and other sensitive credentials. The incident highlights how a single point of compromise in a trusted registry can cascade across every downstream user and pipeline. Stolen credentials from CI/CD systems are especially dangerous because they can grant persistent, broad access to production environments long after the initial breach. Organizations must treat third-party module registries as untrusted until integrity is verified.

Tactical Insight

Immediate actions

  • Rotate all API keys, CI/CD credentials, and secrets that may have been present in environments consuming Coder modules between August 31–September 1, 2026.
  • Audit all Terraform module sources in use and pin dependencies to verified, cryptographically signed versions or known-good commit hashes.
  • Scan CI/CD pipeline logs for any outbound connections to `coder-infra[.]com` or other anomalous domains.

Long-term improvements

  • Implement artifact integrity verification (e.g., checksum validation, code signing) for all third-party modules and dependencies before use in pipelines.
  • Enforce least-privilege access controls on infrastructure management platforms (e.g., Cloudflare) using MFA, short-lived tokens, and strict role separation.
  • Store CI/CD secrets in a dedicated secrets manager with automated rotation and access auditing rather than embedding them in pipeline configurations.

Detection measures

  • Deploy egress filtering and DNS monitoring in CI/CD environments to alert on connections to unexpected or newly registered domains.
  • Enable real-time alerting on unauthorized changes to registry configurations, DNS records, or infrastructure provider settings.
  • Integrate Software Composition Analysis (SCA) tooling into pipelines to detect unexpected or tampered modules before execution.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.