“Day 16: The CI/CD Betrayal — How a Tiny GitHub Action Misconfiguration Led to a $800 Cloud Breach”
A GitHub Actions workflow printed all environment variables to public logs, exposing AWS access keys. Attackers scraped the logs, used the keys to launch GPU instances and mine cryptocurrency, costing $800 in 72 hours.
Published on infosecwriteups.com
During a security assessment for a crypto startup last month, I discovered a misconfigured GitHub Action that was silently leaking AWS credentials to the world. The pipeline was designed to deploy infrastructure, but a single misplaced line exposed secrets that attackers used to mine $800 in cryptocurrency.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
Attackers could use the leaked keys to run cloud resources, resulting in $800 in charges over 72 hours.
What the attacker needed
Public workflow logs; workflow prints secrets to logs
The fix
Secrets should be passed through environment variables rather than echoed, and debug steps that print the environment should be removed.
How it was found
- A workflow step wrote AWS credentials into the environment file.
- A debug step printed all environment variables to the log.
- Attackers scraped the public GitHub Action logs via the API.
- They extracted the AWS keys from the logs.
- They launched GPU instances and installed mining software.
- They disabled logging and used spot instances to avoid alerts.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A build pipeline is an automated system that runs steps to deploy software. Here, one step printed every environment variable, including secret cloud keys, into a log anyone could read. With those keys, an outsider could use the company's cloud account to run expensive machines.