CVE-2026-100395

LXC: lxc-copy host-context hostname update follows symlink

Published Nov 5, 2026 CVSS 4.0 · 6.8 Medium EPSS < 1% KEV · Not listed
Description
LXC is a userspace interface for the Linux kernel containment features used to create and manage system containers. In LXC 7.0.0 and earlier, lxc-copy and the public liblxc clone() API can follow attacker-controlled symbolic links while updating /etc/hostname in a copied container root filesystem. The affected surfaces are lxc-copy and liblxc's public lxc_container::clone() API. The privileged cloning process must run as root. The source rootfs must be attacker-controlled or less trusted. A symlink can be placed at etc/hostname or in an intermediate component. The clone operation preserves the symlink before updating the hostname. The vulnerable write truncates and overwrites an existing file outside the destination rootfs. When root clones an untrusted container without LXC_CLONE_KEEPNAME, the copied symlink can resolve outside the destination rootfs and cause the privileged process to overwrite an existing host file with the destination container name. Unprivileged use and managers with independent cloning implementations are not affected. LXC_CLONE_KEEPNAME avoids the hostname update and therefore the affected write.

Analysis

AI-generated

Technical impact

During the lxc-copy or liblxc clone operation, the daemon follows attacker‑controlled symbolic links while writing /etc/hostname into the copied container root filesystem. If root clones an untrusted container without setting the LXC_CLONE_KEEPNAME option, the symlink can resolve outside the destination rootfs. The privileged cloning process then truncates and overwrites an existing file on the host with the container’s name. Because the process runs as root, the attacker can modify any host file the symlink points to, leading to unintended data loss or privilege‑escalation‑like effects.

Affected Systems

The vulnerability affects LXC 7.0.0 and earlier, specifically the lxc-copy command and the public liblxc lxc_container::clone() API. It requires root privilege to perform the clone; unprivileged or managed cloning implementations are not affected.

Risk and Exploitability

The CVSS score of 6.8 indicates moderate severity, and the EPSS score is not available. The vulnerability is not listed in CISA KEV. The attack requires the ability to supply an untrusted root filesystem to the privileged lxc-copy process and to craft a symlink that points outside the destination. An attacker who can run lxc-copy as root—such as a user with root access or an automation process that clones containers—could exploit this by overwriting a chosen host file, potentially disrupting system operation or enabling further compromise.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply any available vendor patch or upgrade to a version that addresses this vulnerability.
  • When cloning containers as root, supply the LXC_CLONE_KEEPNAME environment variable or use the --keeprename flag to skip the hostname update and prevent the vulnerable write.
  • Ensure that only trusted container images are cloned; avoid cloning containers from untrusted sources when running lxc-copy as root.

Generated by OpenCVE AI on November 5, 2026 at 23:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Lxc
Lxc lxc
Vendors & Products Lxc
Lxc lxc
Type Values Removed Values Added
Description LXC is a userspace interface for the Linux kernel containment features used to create and manage system containers. In LXC 7.0.0 and earlier, lxc-copy and the public liblxc clone() API can follow attacker-controlled symbolic links while updating /etc/hostname in a copied container root filesystem. The affected surfaces are lxc-copy and liblxc's public lxc_container::clone() API. The privileged cloning process must run as root. The source rootfs must be attacker-controlled or less trusted. A symlink can be placed at etc/hostname or in an intermediate component. The clone operation preserves the symlink before updating the hostname. The vulnerable write truncates and overwrites an existing file outside the destination rootfs. When root clones an untrusted container without LXC_CLONE_KEEPNAME, the copied symlink can resolve outside the destination rootfs and cause the privileged process to overwrite an existing host file with the destination container name. Unprivileged use and managers with independent cloning implementations are not affected. LXC_CLONE_KEEPNAME avoids the hostname update and therefore the affected write.
Title LXC: lxc-copy host-context hostname update follows symlink
Weaknesses CWE-59
CWE-61
References
Metrics cvssV4_0

{'score': 6.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

  • CWE-61

    UNIX Symbolic Link (Symlink) Following

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 9, 2026, 5:41 PM
Reserved
Sep 25, 2026, 8:08 PM
Status
Awaiting Analysis
Published
Nov 5, 2026, 10:17 PM
Modified
Nov 12, 2026, 10:18 PM
Severity
Important
Public date
Nov 5, 2026, 9:45 PM