CVE-2023-49291Improper Sanitization of Branch Name Leads to Arbitrary Code Injection
- 9.3CriticalCVSS base score
- 1.4%Exploitation in 30 daysEPSS · top 26% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By GitHub_M
- 10 days later
· 10 days later
Published
- 8 months later
· 8 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Critical9.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.4% · top 26% of all CVEs (15 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.3.
Affected products
- affected < 7.0.7
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- GitHub Actionstj-actions/branch-namesGHSA-8v8w-v8xg-79rf (opens in a new tab)
References
References5
- https://github.com/tj-actions/branch-names/security/advisories/GHSA-8v8w-v8xg-79rf (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/tj-actions/branch-names/commit/4923d1ca41f928c24f1c1b3af9daaadfb71e6337 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tj-actions/branch-names/commit/6c999acf206f5561e19f46301bb310e9e70d8815 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tj-actions/branch-names/commit/726fe9ba5e9da4fcc716223b7994ffd0358af060 (opens in a new tab)x_refsource_MISCx_transferred
- https://securitylab.github.com/research/github-actions-untrusted-input (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-3165 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8v8w-v8xg-79rf (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-49291)Record last updated .