Improper Sanitization of Branch Name Leads to Arbitrary Code Injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
tj-actions/branch-names is a Github action to retrieve branch or tag names with support for all events. The `tj-actions/branch-names` GitHub Actions improperly references the `github.event.pull_request.head.ref` and `github.head_ref` context variables within a GitHub Actions `run` step. The head ref variable is the branch name and can be used to execute arbitrary code using a specially crafted branch name. As a result an attacker can use this vulnerability to steal secrets from or abuse `GITHUB_TOKEN` permissions. This vulnerability has been addressed in version 7.0.7. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| tj-actions | branch-names | before 7.0.7 | 7.0.7 | Patch available | CNA |
| — | tj-actions/branch-names (GitHub Actions) | before 7.0.7 | 7.0.7 | Patch available | GHSA-8v8w-v8xg-79rf |
- branch-names Vendortj-actions Affected before 7.0.7 Fixed in 7.0.7 Patch available CNA
- tj-actions/branch-names (GitHub Actions) Vendor— Affected before 7.0.7 Fixed in 7.0.7 Patch available GHSA-8v8w-v8xg-79rf
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:tj-actions:branch-names:*:*:*:*:*:*:*:* | before 7.0.0; 7.0.1 to before 7.0.7 | Vulnerable | tj-actions |
- cpe:2.3:a:tj-actions:branch-names:*:*:*:*:*:*:*:* Versions before 7.0.0; 7.0.1 to before 7.0.7 Vulnerable ·tj-actions
Remediation
- Fix · CNA branch-names (tj-actions) Fixed in 7.0.7
- Fix · GHSA-8v8w-v8xg-79rf tj-actions/branch-names (GitHub Actions) Fixed in 7.0.7 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-49291
- 2026-10-03 Alias added: GHSA-8v8w-v8xg-79rf
References
Exploit 2
Patch 3
Sources
- CVE-2023-49291 · CVE Program
- CVE-2023-49291 · NVD
- FIRST EPSS
- GHSA-8v8w-v8xg-79rf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences