All vulnerabilities

Go

GHSA-9j25-mm2h-2f76

LXD has arbitrary file write on host via `exec-output` symlink in crafted image

Severity
Critical 9.9
Published
6 Nov 2026
Last changed
6 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.0.0-20260626085134-124f90100640
Weakness
CWE-73
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Sources
OSV.dev and GitHub

Description

Reported from https://github.com/lxc/incus/security/advisories/GHSA-48q5-w887-33wv

The record-output parameter of the /instances/$name/exec endpoint stores the output of the command in the exec-output directory of the instance. If exec-output is a symlink, file named exec_UUID.stdout and exec_UUID.stderr can be written to an arbitrary location where the .stdout file will contain arbitrary content. This behavior can be abused for arbitrary command execution.

When an image is unpacked, top-level symlinks are extracted as is; allowing for exec-output to be placed on disk. In instance_exec.go, os.Mkdir continues of exec-output exists and os.OpenFile follows the exec-output symlink.

Constrained file creation in an arbitrary directory on the host via via an unsanitized symlink; possibly leading to command execution.

From the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
github.com/canonical/lxdGo · osv:Go:github.com/canonical/lxd
  • Every version before 0.0.0-20260626085134-124f90100640

About github.com/canonical/lxd

References