PT-2023-31154 · Github · Tj-Actions/Branch-Names

Adnanekhan

+1

·

Published

2023-12-04

·

Updated

2025-03-17

·

CVE-2023-49291

CVSS v3.1

9.3

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
Name of the Vulnerable Software and Affected Versions tj-actions/branch-names versions prior to 7.0.7
Description 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. An attacker can use this issue to steal secrets from or abuse GITHUB TOKEN permissions.
Recommendations For versions prior to 7.0.7, upgrade to version 7.0.7 to address the issue. As a temporary workaround, consider restricting the use of the github.event.pull request.head.ref and github.head ref context variables within GitHub Actions run steps to minimize the risk of exploitation. Avoid using specially crafted branch names that could be used to inject arbitrary code.

Exploit

Fix

RCE

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2023-49291
GHSA-8V8W-V8XG-79RF

Affected Products

Tj-Actions/Branch-Names