Go
GHSA-pjff-c2wc-f6jm
LXD has arbitrary file write on client due to trusted image hash
- Severity
- Critical 9.9
- Published
- 6 Nov 2026
- Last changed
- 6 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 0.0.0-20260630083100-c5184be310b1
- 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-f6m5-xw2g-xc4x
An arbitrary file write exists in the Incus client when a malicious image server returns a crafted Incus-Image-Hash header. This can lead to arbitrary command execution as root on the server.
- cmd/incusd/images.go:611-684 handles source.type=url by HEADing the user-supplied URL, reading Incus-Image-Hash and Incus-Image-URL, and passing them to imageDownload() as Alias and Server.
- cmd/incusd/daemon_images.go:91-92 defaults fp to the caller-controlled alias string.
- cmd/incusd/daemon_images.go:333-335 builds destName := filepath.Join(destDir, fp).
- cmd/incusd/daemon_images.go:469-523 enters the direct protocol branch, opens destName with os.Create(), and copies the HTTP response into that file.
- cmd/incusd/daemon_images.go:528-532 validates the SHA-256 only after the file has already been created and populated.
Affected software
| Software | Affected versions |
|---|---|
github.com/canonical/lxdGo · osv:Go:github.com/canonical/lxd |
|
About github.com/canonical/lxd
Vulnerabilities in github.com/canonical/lxd
- In our list
- 11
- Published in the last 12 months
- 11
- Critical, last 12 months
- 7
- High, last 12 months
- 2
- Known exploited
- 0
- GHSA-47w9-6r3f-938gLXD has restricted project bypass leading to arbitrary command executionCritical 9.9 6 Nov 2026
- GHSA-7mr3-28h5-m5vxLXD has project restriction bypass for custom volume copy across projectsHigh 7.7 6 Nov 2026
- GHSA-qx75-2p3r-pwm5LXD has project restriction bypass in instance copy across projectsHigh 7.7 6 Nov 2026
- GHSA-fmc8-p6q7-75ccLXD has argument injection in backup compression algorithm leading to AFW and ACECritical 9.9 6 Nov 2026
- GHSA-vghh-5rfx-xhq8LXD has arbitrary file read+write on host via rootfs/ symlink in malicious imageCritical 9.9 6 Nov 2026
- GHSA-jpf8-86f3-wp38LXD has arbitrary file read+write on host via templates/ symlink in malicious imageCritical 9.9 6 Nov 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-pjff-c2wc-f6jm