Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

GHSA-FMC8-P6Q7-75CC: GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code…

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution Vulnerability ID: GHSA-FMC8-P6Q7-75CC CVSS Score: 9.9 Published: 2026-11-06 GHSA-fmc8-p6q7-75cc (associat

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

Vulnerability ID: GHSA-FMC8-P6Q7-75CC
CVSS Score: 9.9
Published: 2026-11-06

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

TL;DR

An argument injection flaw in Canonical LXD's backup compression handling allows authenticated users to pass arbitrary command-line flags to host compression utilities like zstd. By abusing flags such as -o, an attacker can write files from a container directly to the host's /etc/cron.d/ directory, escaping the container and executing arbitrary code as root on the host.

⚠️ Exploit Status: POC

Technical Details

  • Vulnerability ID: GHSA-fmc8-p6q7-75cc (CVE-2026-48755)
  • Primary Weakness: CWE-88: Argument Injection
  • CVSS v3.1 Score: 9.9 Critical (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H)
  • Affected Component: Canonical LXD (compressFile / backup compression parser)
  • Attack Vector: Authenticated REST API request (/1.0/instances/{name}/backups)
  • Security Impact: Container escape, arbitrary host file write, root RCE
  • Exploit Maturity: Public Proof-of-Concept (PoC)
  • CISA KEV Status: Not Listed

Affected Systems

  • Canonical LXD (github.com/canonical/lxd)
  • Linux Containers Incus (github.com/lxc/incus)
  • github.com/canonical/lxd: < 0.0.0-20260630083100-c5184be310b1 (Fixed in: 0.0.0-20260630083100-c5184be310b1)

Code Analysis

Commit: 0915bb8

AppArmor confinement wrapper for backup file compression (CVE-2026-48755)

Commit: 0ab30d1

Pass sys.OS state and apply AppArmor wrapper during compression

Commit: 1887e3d

Update callers of compressFile to supply sys.OS

Commit: 32fd885

AppArmor archive profile generation for compression binaries

Commit: 932592d

Backport compression AppArmor confinement to stable branch

Commit: 9b09906

Confine compression utilities using AppArmor CompressWrapper

Commit: a280842

Ensure backup compression commands run under AppArmor profile

Commit: afc0e7f

Update backup export paths to pass sysOS into compressFile

Commit: b3e8ced

Add AppArmor CompressWrapper implementation in lxd/apparmor/archive.go

Commit: c6c9995

Apply AppArmor confinement to image and backup compression

Commit: e1e6018

Backport CVE-2026-48755 compression wrapper fixes

Commit: e224d6f

lxd/images: Confine compressFile execution with AppArmor

Exploit Details

Mitigation Strategies

  • Upgrade Canonical LXD to a patched release containing the AppArmor CompressWrapper confinement.
  • Ensure the Linux kernel has AppArmor enabled and enforcing so that dynamic confinement profiles are applied to compressor subprocesses.
  • Restrict access to the LXD UNIX socket and REST API (:8443) exclusively to trusted host administrators.
  • Deploy auditd rules and file integrity monitoring on /etc/cron.d/, /etc/crontab, and /etc/ld.so.preload to detect unauthorized host file writes.

Remediation Steps:

  1. Refresh the LXD Snap package to the latest patched revision: sudo snap refresh lxd
  2. For source or Go module deployments, update github.com/canonical/lxd to at least 0.0.0-20260630083100-c5184be310b1.
  3. Verify that AppArmor is active on the host by running: sudo aa-status
  4. Audit existing client certificates and tokens via 'lxc config trust list' and remove untrusted clients.

References

Read the full report for GHSA-FMC8-P6Q7-75CC on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.