CVE-2026-6145: Gh Actions Untrusted Run Interpolation

Direct string interpolation of untrusted GitHub context values into a 'run' step can lead to command injection. An attacker could control these context values (such as github.ref, github.event) and inject shell metacharacters. Bind data to an intermediate environment variable and use the variable in the script instead.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0YAML
greprules fetch cve-2026-6145-gh-actions-untrusted-run-interpolation --engine opengrep

Description

Direct string interpolation of untrusted GitHub context values into a 'run' step can lead to command injection. An attacker could control these context values (such as github.ref, github.event) and inject shell metacharacters. Bind data to an intermediate environment variable and use the variable in the script instead.