Security Digest · Vulnerability record
CVE-2025-54416: tj-actions/branch-names has a Command Injection Vulnerability
tj-actions/branch-names is a Github actions repository that contains workflows to retrieve branch or tag names with support for all events.
CVSS 9.1 Critical EPSS 0.7% · p51
Should you act?
Critical, preconditions apply
Severe if exploited, but exploitation needs conditions that may not apply to you. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.7%, percentile 51: FIRST’s model estimates a 0.7% chance of exploitation activity in the next 30 days, higher than 51% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs an account (low (any account)). Exposure depends on who can log in.
- Only applies if your dependency tree includes
tj-actions/branch-names(GitHub Actions) <= 8.2.1, fixed in 9.0.0. Check your lockfile, including transitive dependencies.
What it is
tj-actions/branch-names is a Github actions repository that contains workflows to retrieve branch or tag names with support for all events. In versions 8.2.1 and below, a critical vulnerability has been identified in the tj-actions/branch-names' GitHub Action workflow which allows arbitrary command execution in downstream workflows. This issue arises due to inconsistent input sanitization and unescaped output, enabling malicious actors to exploit specially crafted branch names or tags. While internal sanitization mechanisms have been implemented, the action outputs remain vulnerable, exposing consuming workflows to significant security risks. This is fixed in version 9.0.0
From the GitHub advisory
Overview
A critical vulnerability has been identified in the tj-actions/branch-names GitHub Action workflow which allows arbitrary command execution in downstream workflows. This issue arises due to inconsistent input sanitization and unescaped output, enabling malicious actors to exploit specially crafted branch names or tags. While internal sanitization mechanisms have been implemented, the action outputs remain vulnerable, exposing consuming workflows to significant security risks.
Technical Details
The vulnerability stems from the unsafe use of the eval printf "%s" pattern within the action's codebase. Although initial sanitization using printf "%q" properly escapes untrusted input, subsequent unescaping via eval printf "%s" reintroduces command injection risks. This unsafe pattern is demonstrated in the following code snippet:
This approach allows attackers to inject arbitrary commands into workflows consuming these outputs, as shown in the Proof-of-Concept (PoC) below.
Weakness type: CWE-77.
Product: tj-actions/branch-names (GitHub Actions) · Assigned by: GitHub_M · Published: 2025-07-26
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| GitHub Actions | tj-actions/branch-names | <= 8.2.1 | 9.0.0 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| tj-actions | branch-names | < 9.0.0 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.1 Critical | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: low (any account)
- User interaction: none
- Scope: changed (can affect other components)
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable no, technical impact partial.
- FIRST EPSS (model of 2026-10-21): 0.65% probability of exploitation activity in the next 30 days; percentile 51.
Timeline
- — GitHub-reviewed advisory GHSA-gq52-6phf-x2r6 published (critical)
- — CVE record published by GitHub_M
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-gq52-6phf-x2r6 github.com
- CVE.org record CVE-2025-54416 cve.org
- NVD entry CVE-2025-54416 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.blog github.blog
- securitylab.github.com securitylab.github.com
Critical GitHub Actions advisories · Today’s Security Digest