CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-41326

CVE-2026-41326: Arbitrary File Overwrite in Kata Containers via CopyFile API Symlink Subversion

Alon Barad
Alon Barad
Software Engineer

May 4, 2026·8 min read·20 visits

Executive Summary (TL;DR)

An authorization bypass in Kata Containers allows host-level attackers to overwrite sensitive guest files via symlink subversion in the CopyFile API.

Kata Containers versions 3.4.0 through 3.28.0 contain a vulnerability in the CopyFile API policy enforcement mechanism. The Kata Agent's policy engine failed to validate the target path of symbolic links, allowing an attacker on the host to overwrite arbitrary files inside the guest VM. This flaw enables privilege escalation and data exfiltration, compromising the isolation boundary of Confidential Virtual Machines.

Vulnerability Overview

Kata Containers provides a standard implementation of lightweight Virtual Machines (VMs) that behave like containers, bridging hardware isolation with standard container workflows. The Kata Agent, running inside the guest VM, exposes a gRPC/ttrpc interface to the host. This interface allows the host-side shim to manage the container lifecycle and transfer files between the host and the guest workload. The CopyFile API handles file transfer requests and relies on a Rego-based policy engine (Open Policy Agent) to enforce authorization boundaries.

CVE-2026-41326 is an authorization bypass and symlink following vulnerability (CWE-61) affecting the CopyFile API in Kata Containers versions 3.4.0 through 3.28.0. The vulnerability occurs because the agent's policy engine validates the destination path of the file write operation but ignores the file type and the associated payload data. When the request specifies the creation of a symbolic link, the policy engine permits the operation based solely on the link's location, rather than examining where the link points.

An attacker with host-level access to the Kata Agent's communication socket can exploit this flaw by issuing a sequence of tailored CopyFile requests. The attacker first creates a symbolic link in an allowed directory that points to a restricted guest file. The attacker then issues a second write request to the newly created symlink, which the agent blindly follows, overwriting the restricted target. This compromises the integrity of the guest VM.

The impact is highly specific to the security model of Confidential Virtual Machines (CVMs), where the guest workload must remain isolated from an untrusted host. By exploiting this flaw, a compromised or malicious host can inject arbitrary code into the guest, modify execution flows, or extract sensitive data. The vulnerability possesses a CVSS 4.0 score of 8.2, reflecting the high integrity impact on the isolated guest subsystem.

Root Cause Analysis

The root cause of CVE-2026-41326 lies in the overloaded nature of the CopyFile API and the incomplete authorization logic applied by the Kata Agent's policy engine. The API processes requests to create regular files, directories, and symbolic links through a single interface. The behavioral mode of the operation is dictated by a file_mode bitmask provided in the remote procedure call.

Prior to version 3.29.0, the CopyFileRequest structure submitted to the policy engine only exposed the intended destination path. The engine evaluated this path against a list of permitted directories, ensuring that the target resided within allowed boundaries such as /run/kata-containers/shared/containers/. The validation logic correctly prevented basic directory traversal attacks by normalizing the provided path.

However, the policy engine lacked visibility into the file_mode and the data fields of the request. When the file_mode bitmask includes the POSIX S_IFLNK flag, the data field represents the target path of the symbolic link rather than file contents. By ignoring the file_mode, the authorization logic treated the symlink creation request as a standard file write, approving it because the link itself was placed in a permitted directory.

Once the symlink exists in the guest filesystem, subsequent file operations interacting with that path follow standard POSIX filesystem semantics. A second CopyFile request targeting the symlink resolves to the absolute or relative path specified during the link's creation. Because the initial path validation only checks the requested endpoint—not the resolved endpoint—the write operation succeeds, bypassing the intended directory restrictions.

Code Analysis & Patch Assessment

The patch introduced in commit 1b9e49eb2763aa6ea6a99b276d3ff5e2c7f658f2 addresses the root cause by decoupling the raw gRPC request from the policy evaluation context. The fix implements a data normalization step within the Kata Agent, transforming the CopyFileRequest into a PolicyCopyFileRequest structure before passing it to the Rego engine. This transformation extracts and explicitly defines the file type and the symlink target.

// Pre-patch structure lacking context
// struct CopyFileRequest { path: String, file_mode: u32, data: Vec<u8> }
 
// Post-patch explicit policy structure
pub struct PolicyCopyFileRequest {
    pub path: String,
    pub file_type: String,     // 'Regular', 'Directory', or 'Symlink'
    pub symlink_target: String // Extracted from data if file_type == 'Symlink'
}

The corresponding Rego policy in src/tools/genpolicy/rules.rego implements rigorous validation for symlink targets. The policy now requires symlinks to be relative, explicitly rejecting any target path beginning with a forward slash. Additionally, the policy enforces path normalization on the target, prohibiting the use of .. components that enable directory traversal out of the permitted scope.

allow_copy_file if {
    input.file_type == "Symlink"
    # Symlinks must be relative.
    not startswith(input.symlink_target, "/")
    # Symlinks must be normalized.
    check_directory_traversal(input.symlink_target)
    # Symlinks are not allowed on the top-level of shared directory.
    allow_copy_file_path(input.path, ".*/.+")
}

The fix is complete and robust. By forcing symlinks to be relative and prohibiting upward directory traversal within the link target, the agent ensures that any created symlink strictly resolves to a location within the already-permitted base directory. Restricting symlinks at the top level of shared directories further hardens the filesystem layout against link-following edge cases.

Exploitation Mechanics

Exploitation of CVE-2026-41326 requires the attacker to possess elevated privileges on the physical host machine, specifically the ability to interact with the Kata Agent's communication socket. In a standard deployment, this socket is restricted and managed by the container runtime shim. An attacker who breaches the host OS or compromises the container orchestrator component can bypass the isolation of Confidential Virtual Machines by interacting directly with the agent.

The attack sequence involves two distinct gRPC/ttrpc requests. In the first phase, the attacker constructs a CopyFile request where the file_mode specifies S_IFLNK. The destination path is set to an allowed directory, such as /run/kata-containers/shared/containers/sandbox-xyz/link. The data payload contains the absolute path to the intended target file within the guest, for example, /etc/shadow or an executable binary in /usr/bin/.

In the second phase, the attacker issues another CopyFile request. This request targets the newly created symlink at /run/kata-containers/shared/containers/sandbox-xyz/link. The policy engine validates this path against its allowlist and permits the operation. The Kata Agent executes the file write operation using standard system calls. The underlying operating system follows the symlink, writing the attacker's payload directly into the restricted target file.

Depending on the overwritten file, the attacker achieves various objectives. Overwriting critical system binaries allows for arbitrary code execution within the guest context. Modifying configuration files or credential stores facilitates privilege escalation or persistence. In the context of Confidential Computing, this breaks the fundamental guarantee that the host cannot tamper with the guest workload.

Impact Assessment

The CVSS 4.0 vector assigned to this vulnerability is CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:H/SI:N/SA:N, resulting in a base score of 8.2. The primary factor driving this high severity rating is the high integrity impact (VI:H) on the vulnerable system and the corresponding high impact on the sub-component (SC:H). The vulnerability allows complete control over the guest filesystem state from the host environment.

Kata Containers is frequently deployed as the runtime engine for Confidential Virtual Machines. CVMs are designed to protect workloads from untrusted or malicious host environments, shifting the trust boundary inward to the hardware and the guest OS. CVE-2026-41326 directly subverts this architecture. A compromised host administrator can trivially bypass the cryptographic and logical isolation provided by the CVM framework, rendering the confidential computing guarantees void.

Despite the severe impact on integrity and isolation, the practical exploitability of this vulnerability is limited by its strict prerequisites. The attacker must already possess local access to the host machine and the ability to interface with the container runtime sockets. Consequently, the EPSS score indicates a very low probability of mass exploitation in the wild (0.00019). The vulnerability poses no risk to internet-facing services unless the underlying host is already severely compromised.

Remediation & Mitigation

The primary remediation for CVE-2026-41326 is upgrading the Kata Containers installation to version 3.29.0 or later. This release incorporates the updated agent logic and the revised Rego policies that normalize input and strictly validate symbolic link targets. Administrators must ensure that the updated agent binary is deployed within all base VM images used by the container runtime.

For environments where immediate patching is not feasible, operators should focus on hardening the host-side infrastructure. Restricting access to the ttrpc/gRPC sockets used by the Kata shims prevents unauthorized local users or processes from communicating with the guest agent. Implement strict Discretionary Access Control (DAC) and Mandatory Access Control (MAC) policies, such as AppArmor or SELinux, on the host OS to confine container orchestration components.

Security teams can verify the integrity of their deployments by auditing the Rego policy files bundled with their Kata Containers distributions. Ensure that the allow_copy_file rule explicitly checks input.file_type and enforces the check_directory_traversal logic on input.symlink_target. Monitoring host-side audit logs for anomalous CopyFile requests, particularly those defining symlinks across isolation boundaries, aids in detecting attempted exploitation.

Official Patches

kata-containersFix commit implementing PolicyCopyFileRequest and Rego validations

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:H/SI:N/SA:N
EPSS Probability
0.02%
Top 95% most exploited

Affected Systems

Kata Containers kata-agentKata Containers genpolicy

Affected Versions Detail

Product
Affected Versions
Fixed Version
kata-containers
kata-containers
>= 3.4.0, < 3.29.03.29.0
AttributeDetail
CWE IDCWE-61
Attack VectorLocal
CVSS v4.0 Score8.2
EPSS Score0.00019
Exploit StatusNone
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1204User Execution
Execution
T1611Escape to Host
Privilege Escalation
CWE-61
UNIX Symbolic Link (Symlink) Following

UNIX Symbolic Link (Symlink) Following

Vulnerability Timeline

Fix commit authored by Fabiano Fidêncio.
2026-04-22
CVE-2026-41326 published by GitHub (CNA).
2026-04-24
Security advisory GHSA-q49m-57vm-c8cc released.
2026-04-24
Last updated in NVD.
2026-05-04

References & Sources

  • [1]NVD Record
  • [2]GitHub Security Advisory
  • [3]Fix Commit
  • [4]CVE.org Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 21 hours ago•GHSA-H5X8-XP6M-X6Q4
7.1

GHSA-H5X8-XP6M-X6Q4: Unvalidated Signature Generation in @jhb.software/payload-cloudinary-plugin

The @jhb.software/payload-cloudinary-plugin exposes an endpoint that performs unvalidated cryptographic signing of Cloudinary API parameters, allowing authenticated users with minimal privileges to forge valid signatures for arbitrary actions. This flaw allows attackers to overwrite remote storage assets, execute unauthorized file uploads, alter asset visibility parameters, trigger SSRF webhooks, and perform directory traversal within Cloudinary repositories.

Alon Barad
Alon Barad
3 views•6 min read
•about 22 hours ago•GHSA-G2GW-Q38M-VJFC
8.7

GHSA-G2GW-Q38M-VJFC: Server-Side Request Forgery and Bearer Token Exfiltration in @merill/lokka

A Server-Side Request Forgery (SSRF) and Bearer Token Exfiltration vulnerability exists in the @merill/lokka (Lokka) Model Context Protocol (MCP) server prior to version 2.1.2. The server constructed Azure Resource Manager request URLs by concatenating user-controlled path parameters directly into destination request strings. By injecting authority-redefinition characters, an attacker can manipulate URL parsing to execute a host-escape attack, forcing the server to send high-privilege Azure Resource Manager (ARM) Bearer tokens to an external attacker-controlled host. This allows complete administrative access to the associated Azure subscriptions.

Alon Barad
Alon Barad
6 views•7 min read
•about 23 hours ago•GHSA-4XGF-CPJX-PC3J
5.3

GHSA-4xgf-cpjx-pc3j: Directory Traversal and Symlink Following in Pydantic Settings

A directory traversal and symlink following vulnerability exists in Pydantic Settings when using the NestedSecretsSettingsSource with nested subdirectory lookups enabled. An attacker capable of writing to the secrets directory can bypass size limitations, read arbitrary host files, or cause a denial-of-service condition via cyclic symlinks.

Amit Schendel
Amit Schendel
2 views•7 min read
•1 day ago•GHSA-H5RG-8P7F-47G2
4.1

GHSA-h5rg-8p7f-47g2: Server-Side Request Forgery (SSRF) in SurrealDB Identity & Access Management (IAM) JWKS Fetcher

A Server-Side Request Forgery (SSRF) vulnerability exists in SurrealDB's Identity & Access Management (IAM) module prior to version 3.1.5. When configuring JSON Web Key Set (JWKS) URLs for token verification, the remote fetcher follows HTTP redirects by default without validating redirect targets against configured network capabilities. This allows high-privileged users to bypass network access limits and perform blind port scanning of internal network resources.

Amit Schendel
Amit Schendel
4 views•6 min read
•1 day ago•GHSA-CC8F-FCX3-GPJR
7.7

GHSA-cc8f-fcx3-gpjr: Arbitrary File Disclosure via DEFINE ANALYZER mapper filter in SurrealDB

A local file disclosure vulnerability exists in SurrealDB's full-text search capabilities, allowing authenticated users with database EDITOR or OWNER roles to read arbitrary files from the host system filesystem. This occurs by abusing the mapper() filter inside a DEFINE ANALYZER statement to point to system files.

Alon Barad
Alon Barad
6 views•6 min read
•1 day ago•GHSA-H4H3-3RFJ-X6FQ
4.3

GHSA-H4H3-3RFJ-X6FQ: Value-Ordering Oracle Side-Channel via Indexed ORDER BY in SurrealDB

SurrealDB versions 3.0.0 through 3.1.4 contain an information exposure vulnerability (CWE-203) where the query planner optimizes sorted queries using indexes on fields with field-level SELECT restrictions. Because the query planner performs index-based sorting before enforcing permission-based redaction, unauthorized users can observe the physical order of returned rows to deduce the relative values of protected fields.

Alon Barad
Alon Barad
4 views•8 min read