Medium [CVE-2026-13218] symlink following in WriteToCachedFile allows host file overwrite from virt-launcher
This medium-severity Red Hat Linux advisory covers CVE-2026-13218 affecting Red Hat OpenShift Virtualization 4.
Android app · Google Play
Monitor future Red Hat Linux CVEs from your phone.
Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.
Summary
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. This flaw affects OpenShift Virtualization deployments where virtual machines are configured with bridge or other non-masquerade network interfaces.
The default network binding mode in OpenShift Virtualization is masquerade, which does not trigger the vulnerable code path — exploitation requires a cluster administrator to have pre-configured a NetworkAttachmentDefinition with bridge-type binding, a condition beyond the attacker's control.
Additionally, the attacker must have exec access to the virt-launcher container (not merely VM guest console access). The file content written by the exploit is constrained to valid JSON following the network cache schema — arbitrary byte injection is not possible.
On OpenShift Container Platform, SELinux mandatory access controls in enforcing mode restrict the set of host files writable by the virt-handler process, and base OS binaries under /usr/ are protected by RHCOS read-only ostree layers.
Affected versions
No affected-version range was extracted from the source record. The vendor advisory is authoritative — check it before change work.
Official advisory · high-confidence parse· fetched 14 days ago·verify at source
Fixed versions
No fixed release is recorded yet. That does not prove no patch exists — confirm against the vendor advisory.
Official advisory · high-confidence parse· fetched 14 days ago·verify at source
Mitigation checklist
- Ensure virtual machines use the default masquerade network binding mode where possible. Restrict pods/exec access on virt-launcher pods to only trusted administrators. Review and restrict NetworkAttachmentDefinition resources to limit which namespaces can configure bridge-type network interfaces.
Official advisory · high-confidence parse· fetched 14 days ago·verify at source
Discussion(0)
No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.
Sign in to join the discussion.