Terraform Cloud token abuse turns speculative plan into remo... #197
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Technical Summary: Terraform Cloud Speculative Plan Execution and Credential Exfiltration
What the post shows
A stolen Terraform Cloud CLI token plus the ability to run a speculative plan lets an attacker execute arbitrary code on Terraform Cloud runners and exfiltrate short‑lived cloud credentials (GCP/AWS). Those credentials can then be used with native CLIs to bypass VCS-gated workflows and make out‑of‑band infrastructure changes.
How Terraform + VCS norma...
🔧 Technical Details
Speculative-plan RCE via external data source: In any Terraform workspace you can access, define
data "external"withprogram = ["bash", "./script.sh"]. Runningterraform planexecutes that program during a speculative run on the runner, enabling arbitrary code execution even whenapplyis VCS-gated.Token pivot from developer machines: Steal
~/.terraform.d/credentials.tfrc.jsonto imperso...🤖 Agent Actions
I analyzed the blog and HackTricks repository, found the most relevant place to incorporate the new technique, and updated the content accordingly.
What I did:
✅ Review Checklist
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.