/

CVE-2026-55158

Severity:

CRITICAL RISK

(9.1)

OS Command Injection (CWE-78) in Conflibot Workflows

CVE-2026-55158

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Conflibot constructs Git commands by interpolating attacker-controlled pull request branch names into shell commands. In the documented pull_request_target workflow, a malicious branch name can cause commands to execute automatically on a repository runner, potentially exposing secrets and enabling unauthorized repository or token activity.

Affected context

The vulnerability occurs in Conflibot workflows that process pull request head branch names and pass constructed Git commands to a shell through exec. Risk is greatest when the workflow uses pull_request_target, runs for contributions from forks, and grants the runner access to base-repository secrets or a write-scoped GITHUB_TOKEN. Exploitation does not require maintainer interaction when the workflow automatically evaluates the attacker-controlled branch name.

Exploit preconditions

  • Attack surface: Automated GitHub Actions workflow handling pull request events
  • Required access: Ability to open a pull request or otherwise control its head branch name
  • Trigger point: Workflow execution that builds Git commands from the pull request head.ref
  • Why exploitation is possible: Shell metacharacters embedded in the branch name are interpreted as command syntax when interpolated into strings passed to exec
  • Environmental condition: The runner must have reachable secrets, repository permissions, or token capabilities that make command execution consequential

Why this happens

The underlying bug is OS command injection caused by combining attacker-controlled branch data with shell command strings. Rather than treating the branch name as a discrete argument, the vulnerable implementation interpolates it into commands executed by a shell. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because shell metacharacters can alter the intended command structure and introduce additional operations.

Potential impact

  • Arbitrary commands may execute on the GitHub Actions runner
  • Repository or organization secrets could be exposed
  • A write-scoped GITHUB_TOKEN could be misused to modify repository contents or workflows
  • Attackers could push unauthorized changes or tamper with pull requests
  • CI/CD credentials and connected systems could be compromised
  • Supply-chain integrity could be weakened through malicious repository changes

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from commands that process untrusted repository metadata.

Common defensive patterns include:

  • Use process-spawning APIs that accept executable paths and argument arrays rather than shell command strings
  • Treat branch names, pull request references, and other event fields as untrusted input
  • Prefer immutable numeric pull request references or validated repository-generated identifiers over branch names where practical
  • Apply strict allowlists and schema validation when textual references must be accepted
  • Minimize workflow token permissions and avoid exposing secrets to untrusted pull request execution
  • Separate untrusted validation jobs from privileged repository automation
  • Disable shell execution when a direct process API provides the required functionality

How teams detect issues like this

Detection can include:

  • Static analysis for string interpolation or concatenation involving GitHub event fields and calls to exec, shell runners, or equivalent APIs
  • Code review checks for pull_request_target workflows that consume head.ref, titles, labels, or other attacker-influenced fields
  • Policy rules requiring argument-array process APIs for external command execution
  • Workflow audits for secrets or write-scoped tokens being available to jobs triggered by forkable pull requests
  • Monitoring for unexpected runner commands, secret access, repository pushes, or workflow-file changes
  • Automated security review tools that flag shell construction from untrusted inputs

Sources

SourceLink
github.comgithub.com/wktk/conflibot/commit/0107ac6a4575ea200d0b92287ea58f975be9505d
github.comgithub.com/wktk/conflibot/commit/59e255c49c920fd6b67471ab9ef3bf194439a3f2
github.comgithub.com/wktk/conflibot/pull/329
github.comgithub.com/wktk/conflibot/releases/tag/v1.2.1
github.comgithub.com/wktk/conflibot/releases/tag/v2.0.0
github.comgithub.com/wktk/conflibot/security/advisories/GHSA-2qvg-qr73-mqxp

Frequently asked

questions

Yes. In the affected workflow configuration, an attacker may be able to open a pull request from a fork and control the branch name processed by the workflow.

Not necessarily. If the workflow automatically runs for the pull request event, the malicious branch name may be processed without additional maintainer interaction.

Avoid constructing shell command strings from untrusted values. Invoke Git or other programs through APIs that pass executable paths and separate argument arrays, while using validated or numeric references where possible.

Treat all pull request metadata as untrusted, minimize token permissions, isolate untrusted jobs from privileged workflows, restrict secret exposure, and enforce automated checks for shell interpolation patterns.

Find out what's already
exploitable in your codebase.