# CVE-2023-30840: On a compromised node, the fluid-csi service account can be used to modify node specs

> An attacker with node access can use the fluid-csi service account to modify node specs, escalating privileges to compromise the entire Kubernetes cluster.

- **Severity:** Medium 5.8 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 May 2023
- **Updated:** 29 Jan 2025
- **Also known as:** GHSA-93xx-cvmc-9w3v, GO-2023-1763

## What is CVE-2023-30840?

CVE-2023-30840 is a medium-severity vulnerability in fluid-cloudnative fluid, published on 8 May 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Fluid is an open source Kubernetes-native distributed dataset orchestrator and accelerator for data-intensive applications. Starting in version 0.7.0 and prior to version 0.8.6, if a malicious user gains control of a Kubernetes node running fluid csi pod (controlled by the `csi-nodeplugin-fluid` node-daemonset), they can leverage the fluid-csi service account to modify specs of all the nodes in the cluster. However, since this service account lacks `list node` permissions, the attacker may need to use other techniques to identify vulnerable nodes.

Once the attacker identifies and modifies the node specs, they can manipulate system-level-privileged components to access all secrets in the cluster or execute pods on other nodes. This allows them to elevate privileges beyond the compromised node and potentially gain full privileged access to the whole cluster.

To exploit this vulnerability, the attacker can make all other nodes unschedulable (for example, patch node with taints) and wait for system-critical components with high privilege to appear on the compromised node. However, this attack requires two prerequisites: a compromised node and identifying all vulnerable nodes through other means.

Version 0.8.6 contains a patch for this issue. As a workaround, delete the `csi-nodeplugin-fluid` daemonset in `fluid-system` namespace and avoid using CSI mode to mount FUSE file systems. Alternatively, using sidecar mode to mount FUSE file systems is recommended.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2023-30840?

3 open source packages ship an affected version, including github.com/fluid-cloudnative/fluid. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/fluid-cloudnative/fluid` | Go | From 0.7.0 | 0.8.6 |
| `github.com/fluid-cloudnative/fluid` | Go | From 0.7.0 | 0.8.6 |
| `github.com/fluid-cloudnative/fluid` | Go | From 0.7.0 | 0.8.6 |

Products: Linuxfoundation Fluid.

## How do I fix CVE-2023-30840?

Upgrade github.com/fluid-cloudnative/fluid to 0.8.6 or later.

## Is CVE-2023-30840 being exploited?

There is no known exploitation of CVE-2023-30840 in the wild and no public exploit code.

## Other vulnerabilities in fluid-cloudnative fluid

- [CVE-2023-51699](https://insights.sbomify.com/CVE-2023-51699/): OS Command Injection for Fluid Users with JuicefsRuntime (medium 4.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-30840 and fix it if it is affected.

What it is: CVE-2023-30840 is a medium-severity vulnerability in fluid-cloudnative fluid, published on 8 May 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-30840 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/fluid-cloudnative/fluid (Go): affected from 0.7.0; fixed in 0.8.6
- github.com/fluid-cloudnative/fluid (Go): affected from 0.7.0; fixed in 0.8.6
- github.com/fluid-cloudnative/fluid (Go): affected from 0.7.0; fixed in 0.8.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-30840/ (Markdown: https://insights.sbomify.com/CVE-2023-30840/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-30840
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-30840
- OSV: https://osv.dev/vulnerability/CVE-2023-30840

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-30840/
Summaries are generated and may contain mistakes; the official description above is the record.
