8.8
HIGH
CVE-2023-31128
NextCloud Cookbook GitHub 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.

INFO

Published Date :

May 26, 2023, 10:15 p.m.

Last Modified :

Nov. 21, 2024, 8:01 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2023-31128 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Nextcloud cookbook

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-31128 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-31128 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/nextcloud/cookbook/blob/a14d6ffc4d45e1447556f68606129dfd6c1505cf/.github/workflows/pull-checks.yml#L67
    Added Reference https://github.com/nextcloud/cookbook/commit/489bb744
    Added Reference https://github.com/nextcloud/cookbook/commit/a46d98559e2c64292da9ffb06138cccc2e50ae1b
    Added Reference https://github.com/nextcloud/cookbook/security/advisories/GHSA-c5pc-mf2f-xq8h
    Added Reference https://securitylab.github.com/research/github-actions-untrusted-input/
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Jun. 05, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/nextcloud/cookbook/blob/a14d6ffc4d45e1447556f68606129dfd6c1505cf/.github/workflows/pull-checks.yml#L67 No Types Assigned https://github.com/nextcloud/cookbook/blob/a14d6ffc4d45e1447556f68606129dfd6c1505cf/.github/workflows/pull-checks.yml#L67 Product
    Changed Reference Type https://github.com/nextcloud/cookbook/commit/489bb744 No Types Assigned https://github.com/nextcloud/cookbook/commit/489bb744 Patch
    Changed Reference Type https://github.com/nextcloud/cookbook/commit/a46d98559e2c64292da9ffb06138cccc2e50ae1b No Types Assigned https://github.com/nextcloud/cookbook/commit/a46d98559e2c64292da9ffb06138cccc2e50ae1b Patch
    Changed Reference Type https://github.com/nextcloud/cookbook/security/advisories/GHSA-c5pc-mf2f-xq8h No Types Assigned https://github.com/nextcloud/cookbook/security/advisories/GHSA-c5pc-mf2f-xq8h Vendor Advisory
    Changed Reference Type https://securitylab.github.com/research/github-actions-untrusted-input/ No Types Assigned https://securitylab.github.com/research/github-actions-untrusted-input/ Exploit, Third Party Advisory
    Added CWE NIST CWE-78
    Added CPE Configuration OR *cpe:2.3:a:nextcloud:cookbook:*:*:*:*:*:*:*:* versions from (including) 0.9.0 up to (excluding) 0.9.19
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-31128 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.54 }} 0.62%

score

0.86787

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability