---
title: "GHSA-9j25-mm2h-2f76: LXD has arbitrary file write on host via `exec-output` symlink in crafted image"
url: https://erroneo.us/security/ghsa/GHSA-9j25-mm2h-2f76/
description: "GHSA-9j25-mm2h-2f76 (critical, Go): LXD has arbitrary file write on host via exec-output symlink in crafted image. Reported from…"
type: advisory
section: "Security Digest"
date_published: 2026-11-06
date_modified: 2026-11-06
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-9j25-mm2h-2f76"
license: All rights reserved. Quote with attribution and a link.
---

# GHSA-9j25-mm2h-2f76: LXD has arbitrary file write on host via `exec-output` symlink in crafted image

## Affected packages

- Go `github.com/canonical/lxd` < 0.0.0-20260626085134-124f90100640 → fixed: 0.0.0-20260626085134-124f90100640

## Details

Reported from https://github.com/lxc/incus/security/advisories/GHSA-48q5-w887-33wv Summary The record-output parameter of the /instances/$name/exec endpoint stores the output of the command in the exec-output directory of the instance. If exec-output is a symlink, file named execUUID.stdout and execUUID.stderr can be written to an arbitrary location where the .stdout file will contain arbitrary content. This behavior can be abused for arbitrary command execution. Details When an image is unpacked, top-level symlinks are extracted as is; allowing for exec-output to be placed on disk. In instanceexec.go, os.Mkdir continues of exec-output exists and os.OpenFile follows the exec-output symlink. PoC Below, we place the execUUID.stdout file in /etc/cron.d on the host for arbitrary command execution. Impact Constrained file creation in an arbitrary directory on the host via via an unsanitized symlink; possibly leading to command execution.

## Sources

- [GitHub Advisory GHSA-9j25-mm2h-2f76](https://github.com/advisories/GHSA-9j25-mm2h-2f76)
- [github.com](https://github.com/canonical/lxd/security/advisories/GHSA-9j25-mm2h-2f76)
- [github.com](https://github.com/lxc/incus/security/advisories/GHSA-73hr-m85f-64v9)
- [nvd.nist.gov](https://nvd.nist.gov/vuln/detail/CVE-2026-48750)
- [github.com](https://github.com/canonical/lxd/commit/124f901006400f634d54d908911c9ea93bae9a70)
- [github.com](https://github.com/canonical/lxd/commit/254b85c9301397e25304116b63da9154093199da)
- [github.com](https://github.com/canonical/lxd/commit/4cd63344f8a523acf39fdc02a80fd64b2e3b584f)
- [github.com](https://github.com/canonical/lxd/commit/937b761393af48fe4f5ff7e610ebfc1c9144e953)
- [github.com](https://github.com/canonical/lxd/commit/bb0f2521a59edacff2a0cb2e9532fdfbe68cf764)
- [github.com](https://github.com/canonical/lxd/releases/tag/lxd-5.21.5)
- [manpages.debian.org](https://manpages.debian.org/bookworm/cron/cron.8.en.html)

---
Source page: https://erroneo.us/security/ghsa/GHSA-9j25-mm2h-2f76/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
