LXD arbitrary file write on host via exec-output symlink

Severity: critical · CVSS 9.9 · Published 2026-11-06

LXD is a container management system that allows users to launch and manage Linux containers. An attacker can craft a malicious container image with a symlink at `exec-output` that causes the container runtime to write files to arbitrary locations on the host system, potentially enabling command execution with root privileges.

Technologies: github.com/canonical/lxd (Go), Linux Containers LXD. Vendors: Go, Linux Containers.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 9.9, published 6 November 2026.
Which products and versions are affected?
github.com/canonical/lxd (Go) < 0.0.0-20260626085134-124f90100640, SEMVER:introduced=0,fixed=0.0.0-20260626085134-124f90100640; Linux Containers LXD <unknown.
Is there a fix for This vulnerability?
Yes. github.com/canonical/lxd (Go): upgrade to 0.0.0-20260626085134-124f90100640 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a network appliance.
Am I affected?
Check whether you run github.com/canonical/lxd (Go) or Linux Containers LXD at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/canonical/lxd (Go): upgrade to 0.0.0-20260626085134-124f90100640 or later
    go get github.com/canonical/lxd@v0.0.0-20260626085134-124f90100640

Technical details

The vulnerability exists in the `/instances/$name/exec` endpoint's `record-output` functionality, which stores command output in the `exec-output` directory. If `exec-output` is a symlink in the container image, `os.OpenFile` in `instance_exec.go` follows the symlink and writes files like `exec_UUID.stdout` and `exec_UUID.stderr` to the target location on the host. An attacker can place the symlink to point to sensitive directories (e.g., `/etc/cron.d`) and write cron job files to achieve arbitrary command execution.

Affected products

  • Linux Containers LXD <unknown

Timeline

  • 2024-11-06: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.