CVE-2026-140086: lxd: Improper link resolution before file access in lxc image export
Improper link resolution before file access in the lxc image export command in Canonical LXD before 4.0.16, 5.0.12, 5.21.10, 6.10.2 allows the operator of a malicious public image remote to overwrite files writable by the invoking user, up to executing attacker-chosen commands as that user by replacing a shell startup file, via a one-character remote-supplied image fingerprint that the client accepts with a SHA-256 prefix check and uses as the default export output path, which follows local symlinks planted in the working directory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
canonical/lxdto a version that resolves this vulnerability.Fixed in 4.0.16 - Upgrade
Upgrade
canonical/lxdto a version that resolves this vulnerability.Fixed in 5.0.12 - Upgrade
Upgrade
canonical/lxdto a version that resolves this vulnerability.Fixed in 5.21.10 - Upgrade
Upgrade
canonical/lxdto a version that resolves this vulnerability.Fixed in 6.10.2
Event History
Frequently Asked Questions
Who is exposed to exploitation?
Users who run the lxc image export command against a malicious public image remote are exposed if an attacker can influence the remote-supplied image fingerprint and has planted a symlink in that user's working directory. The impact is limited to files writable by the user invoking the command.
What does an attacker need to exploit this?
The attacker needs to operate or control a malicious public image remote and provide a one-character image fingerprint accepted by the client's SHA-256 prefix check. They also need a local symlink to exist in the directory from which the user runs the export command, pointing to a file the user can write.
Can this lead to command execution?
Yes. By causing an export to overwrite a shell startup file writable by the invoking user, an attacker can arrange for attacker-chosen commands to run as that user when the shell startup file is processed.
What versions contain the fix?
The issue affects Canonical LXD versions before 4.0.16, 5.0.12, 5.21.10, and 6.10.2. Updating to the applicable listed version or later addresses the vulnerable export behavior.