Burrito: Unauthenticated webhooks trigger unauthorized Terraform plans when webhookSecret is unset
- Published
- Last modified
- Status
- published
- Known exploitation
- Not listed in CISA KEV
- Fix
- Fixed in 0.13.0
- Public exploit
- None on Exploit-DB
Summary
Burrito, a Kubernetes operator for Terraform automation, is affected when its webhook endpoint (burrito-server) accepts unsigned GitHub or GitLab events for repositories that have no webhook secret configured. An unauthenticated attacker who can reach that endpoint and knows a tracked repository's URL could trigger unauthorized Terraform plans using the operator's stored git and cloud credentials, and could expose the resulting plan output in a pull request's comment thread under the wrong branch.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Burrito is a Terraform Automation Collaboration Software (TACoS) Kubernetes operator. Prior to 0.13.0, `POST /api/webhook` accepts unsigned GitHub and GitLab events when a `TerraformRepository`'s credentials omit `webhookSecret` or set it to an empty value, including credentials configured for git authentication and polling. `Credential.WebhookSecret` is optional, and `go-playground/webhooks` skips signature or token verification when the secret is empty. Anyone who can reach `burrito-server`'s endpoint and knows a tracked repository's URL can forge events to create or delete `TerraformPullRequest` custom resources with attacker-chosen `Branch`, `Base`, and `ID` fields. For GitHub `pull_request` events, the controller fetches changed files using the real pull request number but does not cross-check the payload's branch against that pull request. Pairing a real, existing pull request number with an unrelated existing branch in the same repository can therefore cause an unauthorized `terraform plan` for affected layers using the operator's stored git and cloud credentials. Code analysis also indicates that the resulting plan can be posted to the real pull request's comment thread, exposing and misattributing another branch's infrastructure changes. Auto-apply is disabled for these temporary layers, so this vulnerability alone cannot force a `terraform apply`; plan-time provider and data-source code execution depends on the selected branch's contents. This issue is fixed in version 0.13.0.
Affected versions
- padok-team burrito
fixed in 0.13.0