LXD has arbitrary file write on host via exec-output symlink in crafted image
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/canonical/lxd 0.0.0-20260626085134-124f90100640), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- < 0.0.0-20260626085134-124f90100640
- Fixed in
- 0.0.0-20260626085134-124f90100640
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-9j25-mm2h-2f76 lists affected ranges: Go github.com/canonical/lxd >=0 <0.0.0-20260626085134-124f90100640
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-9j25-mm2h-2f76 lists affected ranges: Go github.com/canonical/lxd >=0 <0.0.0-20260626085134-124f90100640 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 9.9 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
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 `exec_UUID.stdout` and `exec_UUID.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 `instance_exec.go`, `os.Mkdir` continues of `exec-output` exists and `os.OpenFile` follows the `exec-output` symlink.
PoC Below, we place the `exec_UUID.stdout` file in `/etc/cron.d` on the host for arbitrary command execution. ``` #!/bin/sh
usage: $0 existing-imagefp set -eu basefp="${1}" die() { printf '%s' "${@}" >&2 exit 1 } command -v curl >/dev/null 2>&1 || die…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 2 · amended ·
Amended from osv record GHSA-9j25-mm2h-2f76
- Revision 1 · created ·
Published from ghsa record GHSA-9j25-mm2h-2f76
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-9j25-mm2h-2f76 Advisory: LXD has arbitrary file write on host via `exec-output` symlink in crafted image IDs: GHSA-9j25-mm2h-2f76 Record: https://patchnext.com/advisories/ghsa-9j25-mm2h-2f76 (revision 2, source checked 7 Nov 2026, 06:05 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Critical (CVSS 9.9) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: github.com/canonical/lxd 0.0.0-20260626085134-124f90100640. A vendor fix does not mean a deployment is fixed. ## Affected components - Go github.com/canonical/lxd: affected < 0.0.0-20260626085134-124f90100640; fixed in 0.0.0-20260626085134-124f90100640 ## Suggested inspection (read-only) - Go github.com/canonical/lxd: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on github.com/canonical/lxd. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-9j25-mm2h-2f76 (GitHub-reviewed advisory GHSA-9j25-mm2h-2f76 lists affected ranges: Go github.com/canonical/lxd >=0 <0.0.0-20260626085134-124f90100640) - Verified: https://osv.dev/vulnerability/GHSA-9j25-mm2h-2f76 (OSV record GHSA-9j25-mm2h-2f76 lists affected ranges: Go github.com/canonical/lxd >=0 <0.0.0-20260626085134-124f90100640 (fixed)) Commands are suggestions: review each one before running it.
Loading voting…