LXD argument injection in backup compression algorithm

Severity: critical · CVSS 9.9 · Published 2026-11-06

LXD is a container management system that allows creating and running virtual machines and containers. The backup feature accepts a user-supplied compression algorithm parameter without proper validation, allowing an attacker to inject arbitrary command arguments. This can result in arbitrary files being written to the host filesystem or arbitrary command execution with the privileges of the LXD daemon.

Technologies: github.com/canonical/lxd (Go). Vendors: Go, LXC.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 9.9, published 6 November 2026.
Which products and versions are affected?
github.com/canonical/lxd (Go) < 0.0.0-20260630083100-c5184be310b1, SEMVER:introduced=0,fixed=0.0.0-20260630083100-c5184be310b1.
Is there a fix for This vulnerability?
Yes. github.com/canonical/lxd (Go): upgrade to 0.0.0-20260630083100-c5184be310b1 or later. Until then: Restrict API access to LXD to trusted users only, and disable remote access if not required. Only allow backup operations from trusted sources until an updated version is deployed. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network.
Am I affected?
Check whether you run github.com/canonical/lxd (Go) or LXC LXD at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/canonical/lxd (Go): upgrade to 0.0.0-20260630083100-c5184be310b1 or later
    go get github.com/canonical/lxd@v0.0.0-20260630083100-c5184be310b1

Restrict API access to LXD to trusted users only, and disable remote access if not required. Only allow backup operations from trusted sources until an updated version is deployed.

Technical details

The vulnerability exists in the backup compression algorithm validation logic, which uses shell parsing to accept the compression_algorithm parameter but only validates the first token against an allowlist. The remaining arguments are passed unsanitized to the compressor command execution, enabling argument injection. An authenticated attacker can craft a malicious compression_algorithm string (e.g., "zstd -d -f --pass-through -o /etc/cron.d/payload -- /path/to/source") to write arbitrary files or execute commands on the host system.

Affected products

  • LXC LXD

Timeline

  • 2026-11-06: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.