Bugcrowd · CI/CD · Critical · $1,000
Don't hack the app. Hack the factory.
Pipelines hold every secret and ship every line of code. They deserve production-grade defences.
Background
Modern products are not deployed by people; they are deployed by pipelines. A CI/CD system holds production secrets, signing keys and cloud credentials, and its output — the built application — is trusted absolutely. That concentration of trust makes pipelines the highest-value target in a modern stack, and historically one of the least hardened: they grew as developer tooling, not as production infrastructure.
The classic pipeline attack shapes:
- Injection through metadata — branch names, commit messages, PR titles flowing unsanitised into shell steps.
- Privilege confusion — workflows triggered by untrusted events (forks, external PRs) running with trusted secrets.
- Artifact trust — build outputs consumed without verifying which run, or whose code, produced them.
The vulnerability
Linktree's pipeline contained a flaw in this family: a path by which less-trusted input could influence the trusted build/deploy process. At Critical severity, the realistic endgame of a pipeline compromise is not a defaced page — it is supply-chain control: modify the artifact, harvest the pipeline's secrets, or pivot into the cloud accounts the pipeline deploys to.
Full exploitation detail was provided to Linktree through Bugcrowd; this writeup keeps the mechanics at the level above, because pipeline configurations repeat across companies and the pattern matters more than the instance.
How I hunt pipelines
- Read the workflow files like source code — because they are. Every trigger, permission block and shell step is a line of the threat model.
- Follow the secrets. Which steps can reach which credentials? A step that only builds docs should never be able to touch a production deploy key.
- Attack the triggers. What untrusted event can start this workflow, and what does the workflow do with that event's data?
- Check the permissions floor. Default-permissive token scopes turn a small injection into a full repository compromise.
Impact
Pipeline compromise is a master-key event: source code, build artifacts, deployment credentials and release integrity all sit behind it. It is the difference between robbing a shop and owning the mint.
Remediation
- Least-privilege tokens per job; read-only by default, write only where the job truly needs it.
- Never interpolate untrusted event data directly into shell commands; pass it through environment variables with validation.
- Separate untrusted-trigger workflows from secret-bearing workflows — different runners, different credentials.
- Pin third-party actions to full commit SHAs and review them like dependencies, because they are.
Lessons
Every company now runs two products: the one users see, and the factory that builds it. Hunters who only test the first are missing the one with all the keys.
Found something similar?
I help teams verify and fix issues like this — and I retest my own reports for free. Reach me at sr558079@gmail.com or read more writeups.