CVE-2025-54416
tj-actions/branch-names has a Command Injection Vulnerability
Published Jul 25, 2025 · updated Sep 10, 2026
#### **Overview** A critical vulnerability has been identified in the 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 pattern within the action's codebase. Although initial sanitization using properly escapes untrusted input, subsequent unescaping via 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. #### **Proof-of-Concept (PoC)** 1. Create a branch with the name . 2. Trigger the vulnerable workflow by opening a pull request into the target repository. 3. Observe arbitrary code execution in the workflow logs. Example output: #### **Impact** This vulnerability enables arbitrary command execution in repositories consuming outputs from . The severity of the impact depends on the permissions granted to the and the context of the triggering event. Potential consequences include: - Theft of sensitive secrets stored in the repository. - Unauthorized write access to the repository. - Compromise of the repository's integrity and security. #### **Mitigation and Resolution** To address this vulnerability, the unsafe pattern must be replaced with safer alternatives. Specifically, direct calls can achieve the same functionality without unescaping shell-unsafe characters. Below is the recommended fix: This approach ensures that all outputs remain properly escaped and safe for downstream consumption. #### **Recommendations** 1. **Immediate Action**: Develo
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Jul 25, 2025 · GitHub Advisory Database
Detected
#### **Overview** A critical vulnerability has been identified in the 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 rema
Sep 10, 2026 · GitHub Advisory Database
Fix available
tj-actions/branch-names fixed in 9.0.0
Sep 10, 2026 · GitHub Advisory Database
Fix available
tj-actions/branch-names fixed in 9.0.0
Sep 10, 2026 · GitHub Advisory Database
Updated
#### **Overview** A critical vulnerability has been identified in the 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 rema
Affected
- GitHub Actions tj-actions/branch-names0 → 9.0.0
Sources
- CVE.orgVulnerability recordCVE-2025-54416
Official CVE identifier
cve.org - GitHub Advisory DatabasePackage advisoryGHSA-gq52-6phf-x2r6
GitHub Advisory Database record mirrored by OSV.
github.com - OSV.devPackage advisoryGHSA-gq52-6phf-x2r6
tj-actions/branch-names has a Command Injection Vulnerability
osv.dev