---
id: "CVE-2026-100395"
page: "https://infrastack.ai/live/CVE-2026-100395"
kind: "vulnerability"
aliases: ["CVE-2026-100395"]
title: "LXC: root cloning of untrusted container can overwrite host files"
severity: "medium"
cvss: 6.8
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["containers", "infrastructure", "linux", "lxc", "self-hosted"]
not_affected_if: ["independent-clone-tooling", "trusted-images-only", "unprivileged-use"]
published_at: "2026-11-05T22:17:41+00:00"
first_seen_at: "2026-11-05T22:46:05+00:00"
updated_at: "2026-11-05T22:46:40+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-100395", "first_seen_at": "2026-11-05T22:46:05+00:00"}]
exploit_sources: []
---

# LXC: root cloning of untrusted container can overwrite host files

Link for people: https://infrastack.ai/live/CVE-2026-100395 (this .md is for agents)

LXC 7.0.0 and earlier, in lxc-copy and the liblxc clone() API, follows attacker-controlled symbolic links when writing /etc/hostname in a copied root filesystem. When root clones an untrusted container without LXC_CLONE_KEEPNAME, an attacker can make the privileged process overwrite an existing host file with the destination container name.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed LXC version with `lxc-create --version` or `lxc-info --version`; versions `7.0.0` and earlier are in scope.
- Look for root-run scripts or tools that call `lxc-copy` or `lxc_container::clone()` on container images that are not fully trusted.
- Unprivileged use and managers with their own cloning code are not affected.

## Timeline

- 2026-11-05T22:46:05+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-100395

## Documents

- [advisory] Vendor advisory: github.com https://github.com/lxc/lxc/security/advisories/GHSA-r23j-58gg-pjjc
- [fix] Patch: github.com https://github.com/lxc/lxc/commit/6424a91a55efc54edc25ca46e9165bd9f35b50b7
- [fix] Patch: github.com https://github.com/lxc/lxc/commit/fa12709a79c2b63b3918297d7505108fcc840eb6

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
