# CVE-2026-13218: Kubevirt: kubevirt: symlink following in writetocachedfile allows host file overwrite from virt-launcher

> Attackers with container access can overwrite arbitrary host files via symlink following in virt-handler, potentially escalating privileges.

- **Severity:** Medium 4.2 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:L`)
- **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:** No
- **Published:** 25 Jun 2026
- **Updated:** 26 Jun 2026
- **Also known as:** AZL-91463, GHSA-q3jc-42cq-33fj, MINI-77qf-fjgh-jqc5, MINI-792p-4qpf-jp4w

## What is CVE-2026-13218?

CVE-2026-13218 is a medium-severity path traversal vulnerability in Red Hat OpenShift Virtualization 4, published on 25 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A flaw was found in KubeVirt's virt-handler network cache handling. The WriteToCachedFile function writes data to a launcher-rooted path using os.WriteFile and os.Chown without symlink protection. A user with access to the virt-launcher container can plant a symlink at the cache file path, causing virt-handler to follow it and overwrite an arbitrary host file with JSON content and change its ownership.

Weakness: CWE-61 (UNIX Symbolic Link (Symlink) Following)

## Which versions are affected by CVE-2026-13218?

It affects 2 products.


Products: Kubevirt Kubevirt, Redhat Openshift Virtualization.

## How do I fix CVE-2026-13218?

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

## Is CVE-2026-13218 being exploited?

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

## Other vulnerabilities in Red Hat OpenShift Virtualization 4

- [CVE-2020-14316](https://insights.sbomify.com/CVE-2020-14316/): Privilege Escalation in kubevirt (critical 9.9)
- [CVE-2022-1798](https://insights.sbomify.com/CVE-2022-1798/): Path Traversal vulnerability in Kubevirt (high 8.7)
- [CVE-2025-64324](https://insights.sbomify.com/CVE-2025-64324/): KubeVirt Vulnerable to Arbitrary Host File Read and Write (high 8.5)
- [CVE-2023-26484](https://insights.sbomify.com/CVE-2023-26484/): On a compromised KubeVirt node, the virt-handler service account can be used to modify all node specs (high 8.2)
- [CVE-2026-13201](https://insights.sbomify.com/CVE-2026-13201/): Path traversal in Red Hat Container Native Virtualization 4.12 (high 7.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-13218 and fix it if it is affected.

What it is: CVE-2026-13218 is a medium-severity path traversal vulnerability in Red Hat OpenShift Virtualization 4, published on 25 Jun 2026. 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-2026-13218 in the wild and no public exploit code.

Affected product: Red Hat OpenShift Virtualization 4. 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-2026-13218/ (Markdown: https://insights.sbomify.com/CVE-2026-13218/index.md)
```

## Sources

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

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