Skip to content

pull-checks.yml workflow is vulnerable

Moderate
christianlupus published GHSA-c5pc-mf2f-xq8h May 20, 2023

Package

No package listed

Affected versions

master <= 7097b168
main-0.9.x <= 04110d30

Patched versions

master >= a46d9855
main-0.9.x >= 489bb744

Description

Summary

The pull-checks.yml workflow is vulnerable to command injection attacks because of using an untrusted github.head_ref field.

Details

git checkout -b head-branch head/${{ github.head_ref }}

You can check this blog post for details: https://securitylab.github.com/research/github-actions-untrusted-input/

PoC

The github.head_ref value is an attacker-controlled value. Assigning the value to zzz";echo${IFS}"hello";# can lead to command injection.

Impact

Since the permission is not restricted, the attacker has a write-access to the repository.

There is no risk for the user of the app within the nextcloud server. This only affects the main repository and possible forks of it. Make sure your fork is on the latest version to prevent code injection attacks and similar.

Severity

Moderate

CVE ID

CVE-2023-31128

Weaknesses

Credits