All vulnerabilities

Servers and applications

CVE-2026-140086

lxc image export short-fingerprint symlink traversal

Severity
High 7.5
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
4.0.16, 5.0.12, 5.21.10, 6.10.2
Weakness
Link following (CWE-59)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data · Slow it down
CVSS vector
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Also known as
GHSA-5jh2-v77p-jr6q
Sources
CVE Program, Project advisories (GitHub)

Description

A malicious public LXD image remote can return a one-character image fingerprint, which the client accepts because it checks that the downloaded SHA-256 starts with the returned value. lxc image export uses that remote value as its default output path and resolves local symlinks before opening the file. If a victim runs the command from an attacker-supplied directory containing symlinks to a caller-writable file, the image bytes replace that file; a shell startup file can then execute attacker-controlled commands as the invoking user. This was reproduced with the pinned client source and a full-fingerprint control.

The supported lxc image export REMOTE:ALIAS path resolves the alias in cmdImage.dereferenceAlias, then reads the image object from the remote. ProtocolLXD.GetPrivateImage unmarshals that object and returns it without validating the Fingerprint field. In cmdImageExport.run, the default output target is the current directory and targetMeta is set to image.Fingerprint.

From canonical/lxd's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
LXDServers and applications · cna:canonical|lxd
  • From 4.0 before 4.0.16
  • From 4.0 before 5.0.12
  • From 4.0 before 5.21.10
  • From 4.0 before 6.10.2
LXDServers and applications · github:canonical/lxd
  • From 4.0 before 4.0.16

About LXD

container manager for system containers

From Wikidata, CC0 1.0.
GitHub stars
4,861GitHub, 29 Nov 2026
Forks
1,080GitHub, 29 Nov 2026
Latest release
lxd-6.10.2GitHub, 29 Nov 2026
Released
26 Nov 2026GitHub
Developer
Stéphane GraberWikidata
License
AGPL-3.0GitHub
Written in
GoWikidata
First released
4 Nov 2014Wikidata
First published on GitHub
4 Nov 2014GitHub

References