Skip to content

Arbitrary code execution in .github/workflows/close_low_effort_issues.yml

High
mr-wewlad published GHSA-32gr-rm34-5j4v Dec 20, 2023

Package

actions close_low_effort_issues.yml (GitHub Actions)

Affected versions

older than commit 78873fa, inclusive

Patched versions

None

Description

Summary

Unquoted variable in the bash code used to close issues can let anyone execute arbitrary code on Github Action servers.

Details

This line has an unquoted variable inside of an if [...], and the variable is actually assigned by people, as it is the issue title. Unquoted variables in Bash might expand to something you don't want to.

PoC

  1. Create an issue
  2. Set its title to export ISSUE_TITLE='-v x[$(your-command-here)] -o false'
  3. Save it
  4. Observe as the low effort issues handler runs your-command-here on Github servers!

Impact

Github might not like random people running arbitrary code on their servers on your behalf.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CVE ID

No known CVE

Weaknesses

No CWEs

Credits