All vulnerabilities

Go

GHSA-jpf8-86f3-wp38

LXD has arbitrary file read+write on host via templates/ symlink in malicious 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-20260203144152-d1c8ba15d160
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-vxp5-584q-c479

A specially crafted image can be used to read or create/write arbitrary files on the host; possibly leading to arbitrary command execution.

For container images, internal/server/storage/utils.go calls archive.Unpack(imageFile, destPath, ...). The tar extraction path in shared/archive/archive.go excludes device nodes, but it does not reject a top-level templates symlink.

In practice, this allows a malicious actor to access an arbitrary directory and edit arbitrary files in it.

Arbitrary file read and write on the host via 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-20260203144152-d1c8ba15d160

About github.com/canonical/lxd

References