CVE-2023-31128

Public Exploit
NextCloud Cookbook's pull-checks.yml workflow is vulnerable to OS Command Injection

Description

NextCloud Cookbook is a recipe library app. Prior to commit a46d9855 on the `master` branch and commit 489bb744 on the `main-0.9.x` branch, the `pull-checks.yml` workflow is vulnerable to command injection attacks because of using an untrusted `github.head_ref` field. The `github.head_ref` value is an attacker-controlled value. Assigning the value to `zzz";echo${IFS}"hello";#` can lead to command injection. Since the permission is not restricted, the attacker has a write-access to the repository. This issue is fixed in commit a46d9855 on the `master` branch and commit 489bb744 on the `main-0.9.x` branch. 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. Those who have forked the NextCloud Cookbook repository should make sure their forks are on the latest version to prevent code injection attacks and similar.

Category

8.1
CVSS
Severity: High
CVSS 3.1 •
EPSS 1.47% Top 25%
Vendor Advisory github.com
Affected: nextcloud cookbook
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-31128?
CVE-2023-31128 has been scored as a high severity vulnerability.
How to fix CVE-2023-31128?
To fix CVE-2023-31128, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-31128 being actively exploited in the wild?
It is possible that CVE-2023-31128 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-31128?
CVE-2023-31128 affects nextcloud cookbook.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.