All vulnerabilities

Servers and applications

CVE-2026-81500

Incus CLI path traversal when exporting an image from a malicious server

Severity
Medium 4.2
Published
27 Aug 2026
Last changed
27 Aug 2026
Added to UpHeron
1 Nov 2026
Fixed in
7.4.0
Weakness
Path traversal (CWE-22)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Change some data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L
Also known as
GHSA-9pqw-c7m4-xvg7
Sources
Project advisories (GitHub)

Description

The incus CLI, when exporting or copying an image from a remote server into a directory target, takes the local filename verbatim from the server-controlled Content-Disposition: filename= for UNIFIED images and passes it into os.Rename(tmp, filepath.Join(target, resp.MetaName)) with no filepath.Base / traversal check. A malicious or MITM'd image server that the user points the CLI at can therefore write the downloaded (attacker-controlled) image bytes to an arbitrary path on the client, escaping the export directory — e.g. overwrite ~/.bashrc → code execution on the client's next shell.

On the unified-image branch (client/incus_images.go:339, forced by the server not sending a multipart/form-data Content-Type), mime.ParseMediaType(Content-Disposition) yields filename = cdParams["filename"] and resp.MetaName = filename is stored verbatim at client/incus_images.go:356 with NO filepath.Base.

From lxc/incus's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
IncusServers and applications · github:lxc/incus
  • Every version before 7.4.0

About Incus

container manager for system containers

From Wikidata, CC0 1.0.
GitHub stars
6,644GitHub, 15 Nov 2026
Forks
522GitHub, 15 Nov 2026
Latest release
v7.6.0GitHub, 15 Nov 2026
Released
30 Oct 2026GitHub
Developer
Linux ContainersWikidata
License
Apache Software License 2.0Wikidata
Written in
GoWikidata
First released
7 Aug 2023Wikidata
First published on GitHub
22 Jul 2023GitHub

References