# CVE-2020-2023: Kata Containers - Containers have access to the guest root filesystem device

> Malicious containers can access the guest root filesystem to execute code and impersonate the kata-agent, requiring an upgrade to secure the environment.

- **Severity:** Low 3.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Jun 2020
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-6978-vg2j-cc9q

## What is CVE-2020-2023?

CVE-2020-2023 is a low-severity vulnerability in Kata Containers, published on 10 Jun 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Kata Containers doesn't restrict containers from accessing the guest's root filesystem device. Malicious containers can exploit this to gain code execution on the guest and masquerade as the kata-agent. This issue affects Kata Containers 1.11 versions earlier than 1.11.1; Kata Containers 1.10 versions earlier than 1.10.5; and Kata Containers 1.9 and earlier versions.

Weakness: CWE-250 (Execution with Unnecessary Privileges)

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

12 open source packages ship an affected version, including github.com/kata-containers/agent and github.com/kata-containers/runtime. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/kata-containers/agent` | Go | All versions | 1.9.1 |
| `github.com/kata-containers/agent` | Go | All versions | 1.9.1 |
| `github.com/kata-containers/agent` | Go | From 1.10.0 | 1.10.5 |
| `github.com/kata-containers/agent` | Go | From 1.10.0 | 1.10.5 |
| `github.com/kata-containers/agent` | Go | From 1.11.0 | 1.11.1 |
| `github.com/kata-containers/agent` | Go | From 1.11.0 | 1.11.1 |
| `github.com/kata-containers/runtime` | Go | All versions | 1.9.1 |
| `github.com/kata-containers/runtime` | Go | All versions | 1.9.1 |
| `github.com/kata-containers/runtime` | Go | From 1.10.0 | 1.10.5 |
| `github.com/kata-containers/runtime` | Go | From 1.10.0 | 1.10.5 |
| `github.com/kata-containers/runtime` | Go | From 1.11.0 | 1.11.1 |
| `github.com/kata-containers/runtime` | Go | From 1.11.0 | 1.11.1 |

Products: Katacontainers Runtime.

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

Upgrade github.com/kata-containers/agent to a fixed version for your release line: 1.9.1, 1.10.5 or 1.11.1.

## Is CVE-2020-2023 being exploited?

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

Public exploit code:

- https://github.com/ssst0n3/kata-cve-2020-2023-poc (github_poc): https://github.com/ssst0n3/kata-cve-2020-2023-poc

## Other vulnerabilities in Kata Containers

- [CVE-2020-2025](https://insights.sbomify.com/CVE-2020-2025/): Kata Containers - Cloud Hypervisor guests persist filesystem changes to the underlying host image file (high 8.8)
- [CVE-2020-2024](https://insights.sbomify.com/CVE-2020-2024/): Kata Containers - Guests can trick the kata-runtime into unmounting any mount point on the host (medium 6.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2020-2023 is a low-severity vulnerability in Kata Containers, published on 10 Jun 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-2023 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/kata-containers/agent (Go): affected all versions; fixed in 1.9.1
- github.com/kata-containers/agent (Go): affected all versions; fixed in 1.9.1
- github.com/kata-containers/agent (Go): affected from 1.10.0; fixed in 1.10.5
- github.com/kata-containers/agent (Go): affected from 1.10.0; fixed in 1.10.5
- github.com/kata-containers/agent (Go): affected from 1.11.0; fixed in 1.11.1
- github.com/kata-containers/agent (Go): affected from 1.11.0; fixed in 1.11.1
- github.com/kata-containers/runtime (Go): affected all versions; fixed in 1.9.1
- github.com/kata-containers/runtime (Go): affected all versions; fixed in 1.9.1
- github.com/kata-containers/runtime (Go): affected from 1.10.0; fixed in 1.10.5
- github.com/kata-containers/runtime (Go): affected from 1.10.0; fixed in 1.10.5
- github.com/kata-containers/runtime (Go): affected from 1.11.0; fixed in 1.11.1
- github.com/kata-containers/runtime (Go): affected from 1.11.0; fixed in 1.11.1

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

## Sources

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

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