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

EcosystemPackageVulnerableFirst fixed
GitHub Actionstj-actions/branch-names<= 8.2.19.0.0
VendorProductAffected versions (per CVE record)
tj-actionsbranch-names< 9.0.0

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.1 CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L
GitHub3.19.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

  1. GitHub Advisory GHSA-gq52-6phf-x2r6 github.com
  2. CVE.org record CVE-2025-54416 cve.org
  3. NVD entry CVE-2025-54416 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. github.com github.com
  6. github.blog github.blog
  7. securitylab.github.com securitylab.github.com

Critical GitHub Actions advisories · Today’s Security Digest