Skip to content
Fencer Vulns
critical 9.3

CVE-2023-49291 json

Improper Sanitization of Branch Name Leads to Arbitrary Code Injection

published 2023-12-04 2 y ago modified 2026-06-17 4 mo ago also EUVD-2023-3165 , GHSA-8v8w-v8xg-79rf

cvss
9.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.4%
EPSS 1.4% chance of exploitation in 30 days, percentile 73%
public exploits
0
none known

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.

Patch / fix

  • github-actions tj-actions/branch-names 7.0.7
  • tj-actions branch-names 7.0.0, 7.0.7

Exploit prediction

1.45% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/tj-actions/branch-names/security/advisories/GHSA-8v8w-v8xg-79rf referenced PoC, tagged "exploit" by a source, unverified
  • securitylab.github.com https://securitylab.github.com/research/github-actions-untrusted-input referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 9.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
GitHub 3.1 9.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
github-actions tj-actions/branch-names
<7.0.7
7.0.7

Affected products

  • tj-actions branch-names

Classification

Weakness
  • CWE-20 Improper Input Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.