CVE-2023-31128: nextcloud cookbook OS Command Injection
Vulnerability summary
CVE-2023-31128 is a high (CVSS 8.8) OS Command Injection vulnerability in nextcloud cookbook. EPSS estimates a 3.34% chance of exploitation in the next 30 days, higher than 88.5% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 26-05-2023PublishedVulnerability first disclosed.
- 14-01-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
2 scores · 2 sources · 1 version- CVE.orgCNA8.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:HDiffers
EPSS trend
Probability
3.34%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
0.00 pp
From 3.34% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundGithub Actions Untrusted Input
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Nextcloud1 product
- cookbookmaster < a46d9855 | main-0.9.x < 489bb744 | ≥ 0.9.0, < 0.9.19
1 vendor · 1 product
References
5 links- github.com/nextcloud/cookbook/security/advisories/GHSA-c5pc-mf2f-xq8hX Refsource CONFIRMVendor Advisory
- securitylab.github.com/research/github-actions-untrusted-input/X Refsource MISCExploitThird Party Advisory