// For flags

CVE-2023-49291

Improper Sanitization of Branch Name Leads to Arbitrary Code Injection

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

2
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

tj-actions/branch-names is a Github action to retrieve branch or tag names with support for all events. 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. As a result an attacker can use this vulnerability to steal secrets from or abuse `GITHUB_TOKEN` permissions. This vulnerability has been addressed in version 7.0.7. Users are advised to upgrade. There are no known workarounds for this vulnerability.

tj-actions/branch-names es una acción de Github para recuperar nombres de ramas o etiquetas con soporte para todos los eventos. Las GitHub Actions `tj-actions/branch-names` hacen referencia incorrectamente a las variables de contexto `github.event.pull_request.head.ref` y `github.head_ref` dentro de un paso de `ejecución` de GitHub Actions. La variable head ref es el nombre de la rama y se puede usar para ejecutar código arbitrario usando un nombre de rama especialmente manipulado. Como resultado, un atacante puede utilizar esta vulnerabilidad para robar secretos o abusar de los permisos "GITHUB_TOKEN". Esta vulnerabilidad se ha solucionado en la versión 7.0.7. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
High
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-11-24 CVE Reserved
  • 2023-12-04 CVE Published
  • 2024-08-02 CVE Updated
  • 2024-08-02 First Exploit
  • 2024-11-03 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-20: Improper Input Validation
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Tj-actions
Search vendor "Tj-actions"
Branch-names
Search vendor "Tj-actions" for product "Branch-names"
< 7.0.0
Search vendor "Tj-actions" for product "Branch-names" and version " < 7.0.0"
-
Affected
Tj-actions
Search vendor "Tj-actions"
Branch-names
Search vendor "Tj-actions" for product "Branch-names"
>= 7.0.1 < 7.0.7
Search vendor "Tj-actions" for product "Branch-names" and version " >= 7.0.1 < 7.0.7"
-
Affected