Workflow command execution via unquoted branch reference
Published May 26, 2023 · Updated Jan 14, 2025
OS command injection in Nextcloud Cookbook repository workflows allows remote authenticated users to execute commands through pull requests. The pull-checks.yml workflow inserts the attacker-controlled github.head_ref value directly into a shell script that forms a git checkout command. A GitHub account able to open a pull request can run commands with the workflow token and write to the repository, while installed Nextcloud apps are not exposed.
Summary
What happened
OS command injection in Nextcloud Cookbook repository workflows allows remote authenticated users to execute commands through pull requests. The pull-checks.yml workflow inserts the attacker-controlled github.head_ref value directly into a shell script that forms a git checkout command. A GitHub account able to open a pull request can run commands with the workflow token and write to the repository, while installed Nextcloud apps are not exposed.
The record
- CVE
- CVE-2023-31128
- Published
- May 26, 2023
- Updated
- Jan 14, 2025
- Vendor
- Nextcloud GmbH
- Product
- Cookbook
- Classifications
- CWE-78, T1059.004
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- May 26, 2023CVE publishedPublication date reported by the CVE source.
- Jan 14, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=main-0.9.x < 489bb744
- Affected versionversion=master < a46d9855
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Attacker-controlled github.head_ref command-injection payloadproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo