# CVE-2023-44392: Arbitrary code execution vulnerability when using shared Kubernetes cluster

> An attacker with Kubernetes cluster access can achieve remote code execution on a developer's machine by injecting malicious serialized objects into cached ConfigMaps.

- **Severity:** High 8.3 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 9 Oct 2023
- **Updated:** 18 Sep 2024
- **Also known as:** GHSA-hm75-6vc9-8rpr

## What is CVE-2023-44392?

CVE-2023-44392 is a high-severity unsafe deserialization vulnerability in garden-io garden, published on 9 Oct 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

Garden provides automation for Kubernetes development and testing. Prior tov ersions 0.13.17 and 0.12.65, Garden has a dependency on the cryo library, which is vulnerable to code injection due to an insecure implementation of deserialization. Garden stores serialized objects using cryo in the Kubernetes `ConfigMap` resources prefixed with `test-result` and `run-result` to cache Garden test and run results. These `ConfigMaps` are stored either in the `garden-system` namespace or the configured user namespace. When a user invokes the command `garden test` or `garden run` objects stored in the `ConfigMap` are retrieved and deserialized. This can be used by an attacker with access to the Kubernetes cluster to store malicious objects in the `ConfigMap`, which can trigger a remote code execution on the users machine when cryo deserializes the object. In order to exploit this vulnerability, an attacker must have access to the Kubernetes cluster used to deploy garden remote environments. Further, a user must actively invoke either a `garden test` or `garden run` which has previously cached results. The issue has been patched in Garden versions `0.13.17` (Bonsai) and `0.12.65` (Acorn). Only Garden versions prior to these are vulnerable. No known workarounds are available.

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-502 (Deserialization of Untrusted Data)

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

It affects 1 product.


Products: Garden Garden.

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

No fix has been published for CVE-2023-44392 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-44392 being exploited?

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

## Other vulnerabilities in garden-io garden

- [CVE-2022-24829](https://insights.sbomify.com/CVE-2022-24829/): Missing authentication in Garden (high 8.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2023-44392 is a high-severity unsafe deserialization vulnerability in garden-io garden, published on 9 Oct 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-44392 in the wild and no public exploit code.

Affected product: garden-io garden. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-44392/ (Markdown: https://insights.sbomify.com/CVE-2023-44392/index.md)
```

## Sources

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

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