CVE-2026-41326: Kata Containers: CopyFile Policy Subversion via Symlinks

Published Apr 22, 2026
·
Updated

Summary An oversight in the CopyFile policy (and perhaps the CopyFile handler) allows untrusted hosts to write to arbitrary locations inside the guest workload image. This can be used to overwrite binaries inside the guest and exfiltrate data from containers; even those running inside CVMs.

Details Here is the policy that covers CopyFile requests. CopyFileRequest if { print("CopyFileRequest: input.path =", input.path) checkdirectorytraversal(input.path) some regex1 in policydata.requestdefaults.CopyFileRequest regex2 := replace(regex1, "$(sfprefix)", policydata.common.sfprefix) regex3 := replace(regex2, "$(cpath)", policydata.common.cpath) regex4 := replace(regex3, "$(bundle-id)", "[a-z0-9]{64}") print("CopyFileRequest: regex4 =", regex4) regex.match(regex4, input.path) print("CopyFileRequest: true") } This checks that files are being copied to policydata.common.cpath, which is typically set to /run/kata-containers/shared/containers. In other words, you're allowed to copy files to anywhere inside the shared dir.

For reference, here is the CopyFile message. Note that none of the other fields are check in the policy. message CopyFileRequest { // Path is the destination file in the guest. It must be absolute, // canonical and below /run. string path = 1; // FileSize is the expected file size, for security reasons write operations // are made in a temporary file, once it has the expected size, it's moved // to the destination path. int64 filesize = 2; // FileMode is the file mode. uint32 filemode = 3; // DirMode is the mode for the parent directories of destination path. uint32 dirmode = 4; // Uid is the numeric user id. int32 uid = 5; // Gid is the numeric group id. int32 gid = 6; // Offset for the next write operation. int64 offset = 7; // Data to write in the destination file. bytes data = 8; }

In addition to copying files directly, the Kata Agent supports creating symlinks via the CopyFile API. In this case the path is the symlink name and the data field contains the symlink target. Given that the policy only checks the path, an attacker can craft a CopyFile request that results in a symlink going from any location into the shared dir.

PoC The above primitive can be used to to write arbitrary data into container images (pulled in the guest or otherwise). A couple steps are required.

First, identify some target path in the guest image. This could be a binary that will be called by the workload. You could also experiment with overwriting other stuff.

Create a symlink from this binary to the shared dir. The path/link name should be in the shared dir and the data/target should point to the path of the target file inside the container image in the guest fs.

Create a second CopyFile request to copy your data from the host into the symlink you just created in the shared dir. This will then be propagated into the image. You may want to restart the container to ensure that your new binary is invoked.

Impact Anyone who is using the upstream genpolicy implementation and expects it to prevent host access to container images is vulnerable This includes Confidential Containers workloads where the trust model explicitly forbids this type of access. If you have your own policy implementation you may or may not be vulnerable. If you do not care about protecting the image from the host (e.g. you are using unprotected host pull), you are not vulnerable.

This was discovered by @calonso-nv.

Other sources

Kata Containers is an open source project focusing on a standard implementation of lightweight Virtual Machines (VMs) that perform like containers. From v3.4.0 to v3.28.0, an oversight in the CopyFile policy (and perhaps the CopyFile handler) allows untrusted hosts to write to arbitrary locations inside the guest workload image. This can be used to overwrite binaries inside the guest and exfiltrate data from containers; even those running inside CVMs. This vulnerability is fixed in v3.29.0.

NVD

Affected Software

4 affected componentsFixes available
Kata Containers Kata Containers>=3.4.0<=3.28.0
go/github.com/kata-containers/kata-containers<0.0.0-20260422180503-1b9e49eb2763
0.0.0-20260422180503-1b9e49eb2763
katacontainers Confidential Containers>=0.9.0<0.20.0
katacontainers Kata Containers>=3.4.0<3.29.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/kata-containers/kata-containers to a version that resolves this vulnerability.

    Fixed in 0.0.0-20260422180503-1b9e49eb2763
  2. Upgrade

    Upgrade kata-containers to a version that resolves this vulnerability.

    Fixed in v3.29.0
  3. Compensating control

    If you use upstream genpolicy, ensure the CopyFile policy implementation does not permit creating symlinks that allow untrusted hosts to write arbitrary locations inside the guest workload image; otherwise treat host access to container images as forbidden under your trust model.

Event History

Apr 22, 2026
Data Sourced
via Red Hat·07:08 PM
DescriptionSeverityAffected Software
Apr 24, 2026
CVE Published
via MITRE·06:46 PM
Data Sourced
via MITRE·06:46 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
RemedyAffected Software
May 4, 2026
Advisory Published
via GitHub·07:32 PM
Data Sourced
via GitHub·07:32 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-41326?

The severity of CVE-2026-41326 is considered medium due to its potential for exploitation via symlinks.

2

How do I fix CVE-2026-41326?

To fix CVE-2026-41326, update your Kata Containers installation to a version later than 3.28.0.

3

What versions of Kata Containers are affected by CVE-2026-41326?

CVE-2026-41326 affects Kata Containers versions from 3.4.0 to 3.28.0.

4

What type of vulnerability is CVE-2026-41326?

CVE-2026-41326 is a vulnerability related to the CopyFile policy that may allow exploitation through symlinks.

5

Who is impacted by CVE-2026-41326?

Users and administrators running affected versions of Kata Containers are impacted by CVE-2026-41326.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203