Detect Incus Backup/Image Metadata Path-Traversal via Special Files, Hard Links, or Symlinks (CVE-2026-130771) in Google Chronicle
Detects potential exploitation of CVE-2026-130771, a CWE-59 (link following) flaw in Incus before 7.6.0. Incus fails to reject special files (device nodes, FIFOs), hard links, or symlinks embedded in backup archives or image metadata. A restricted project user who imports a crafted backup or image can cause the Incus daemon (running as root on the host) to follow a link or special file during unpack, reading or overwriting arbitrary host files outside the project boundary. Because Incus does not log archive member types, detection focuses on host-level telemetry: image/backup import API calls from restricted projects, incusd (root) file writes/reads outside its normal storage directories, and creation of symlinks/hard links/device nodes under storage unpack paths. Tune to your Incus storage pool layout.
MITRE ATT&CK
- Tactic
- Stealth Privilege Escalation Discovery
YARA-L Detection Query
// df00tech DF00-2d52595fdc · https://df00tech.com/detections/CVE-2026-130771 · licence: https://df00tech.com/detections/licence
rule incus_link_following_cve_2026_130771 {
meta:
author = "Argus"
description = "Incus daemon creating symlinks/special files in storage or writing outside storage (CVE-2026-130771)"
severity = "HIGH"
events:
$e.principal.process.file.full_path = /.*\/incusd?$/
(
($e.target.file.full_path = /^\/var\/lib\/incus\/.*/ and $e.metadata.event_type = "FILE_CREATION" and $e.target.file.file_type = /SYMLINK|SPECIAL|DEVICE/) or
($e.target.file.full_path = /^\/(etc|root|home|boot)\/.*/ and not $e.target.file.full_path = /^\/var\/lib\/incus\/.*/)
)
condition:
$e
} YARA-L rule matching Incus daemon link/special-file creation in storage or writes into sensitive host paths.
Data Sources
Required Tables
False Positives & Tuning
- Storage pool maintenance.
- Trusted backup restores with internal symlinks.
- Image publishing creating internal links.
Other platforms for CVE-2026-130771
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 further down this page.
- Test 1 Backup archive containing a symlink escaping the project (lab)
Expected signal: File-event telemetry shows a symlink member being unpacked by incusd under the storage pool; tar listing shows a symlink member.
- Test 2 Image metadata tarball with a special (device) file (lab)
Expected signal: Creation of a character-device special file during unpack is recorded by auditd/osquery with process incusd.
- Test 3 Hard link to a root-owned host file in a backup (lab)
Expected signal: Hard-link creation event with initiating process incusd is captured during unpack.
Response Playbook
Triage
- Confirm the Incus version on the host (`incus version` / package manager); versions before 7.6.0 are vulnerable to CVE-2026-130771.
- Correlate the alert with recent image or backup import API calls (`incus image import`, `incus import`, POST /1.0/images, POST /1.0/instances with a backup source) and identify the originating project and user.
- Determine whether the project is a restricted project (`incus project show <project>` → restricted=true); restricted project users are the threat model for this CVE.
- Inspect the flagged file path: if incusd created a symlink/hard link/device node inside the storage pool, or wrote to a sensitive host path (/etc, /root, server.key), treat as likely exploitation.
Containment
- Disable image/backup imports for untrusted projects (restrict project permissions or pause the affected project) until the daemon is patched.
- Isolate the affected host from the management network if host file overwrite is confirmed, and freeze the storage pool to preserve evidence.
- Rotate any host secrets that may have been read or overwritten (incus server.key/server.crt, SSH keys under /root/.ssh, credentials under /etc).
Evidence Collection
- Capture the imported backup archive or image tarball and enumerate its members with type info (`tar -tvf` / `bsdtar -tvf`) to confirm presence of symlinks, hard links, or special files.
- Collect auditd/osquery file-event logs for incusd around the import timestamp, plus the Incus daemon log (`journalctl -u incus`).
- Snapshot the affected host filesystem metadata (timestamps/inodes) for sensitive paths to document any overwrite.
Escalation Criteria
- !Escalate to IR if incusd is confirmed to have read or overwritten a file outside the storage pool (host compromise).
- !Escalate if the import originated from a restricted/untrusted project user or an unexpected API token, indicating deliberate exploitation.
Investigation Guide
Forensic Artifacts
- >
The imported backup/image archive containing special files, hard links, or symlinks. - >
Incus daemon log entries (journalctl -u incus) around the import. - >
auditd/osquery records of incusd file operations outside the storage pool. - >
Modified-time/inode changes on sensitive host files (/etc, /root, incus server.key).
Tuning Guidance
Baseline your Incus storage pool layout (default /var/lib/incus/storage-pools, but ZFS/btrfs/dir backends differ) and whitelist legitimate internal symlinks created during normal snapshot/publish operations. Focus high-confidence alerting on incusd writes/links that resolve OUTSIDE the storage pool and on device-node creation, which is never expected during normal unpack. Correlate with import API audit events to reduce noise.
Hunting Queries
Hunt for Incus daemon creating links/special files or touching sensitive host paths, aggregated by host.
// df00tech DF00-2d52595fdc · https://df00tech.com/detections/CVE-2026-130771 · licence: https://df00tech.com/detections/licence
DeviceFileEvents | where InitiatingProcessFileName in~ ("incusd","incus") | where ActionType in ("SymbolicLinkCreated","HardLinkCreated") or FolderPath startswith "/etc/" or FolderPath startswith "/root/" | summarize count() by DeviceName, FolderPath, ActionType, bin(Timestamp, 1h) ``` df00tech DF00-2d52595fdc · https://df00tech.com/detections/CVE-2026-130771 · licence: https://df00tech.com/detections/licence ```
index=linux_osquery (process_name=incusd OR process_name=incus) (file_type="symbolic link" OR file_type="special" OR file_path="/etc/*" OR file_path="/root/*") | stats count by host, file_path, file_type Atomic Red Team Tests
Builds a tar backup whose member is a symlink pointing at a host file, simulating a crafted Incus backup. Lab-only; do not run against production Incus.
Command
mkdir -p /tmp/cve130771/backup && cd /tmp/cve130771/backup && ln -s /etc/shadow leak_link && tar -cvf /tmp/cve130771/malicious-backup.tar --format=gnu leak_link && echo 'Now: incus import /tmp/cve130771/malicious-backup.tar in a restricted project (vuln <7.6.0)' Cleanup
rm -rf /tmp/cve130771 Expected Telemetry
File-event telemetry shows a symlink member being unpacked by incusd under the storage pool; tar listing shows a symlink member.
Expected Detection
The symlink-in-storage branch of the queries fires when incusd unpacks the archive.
Creates an image-style tarball containing a character device node, simulating a special file in image metadata that Incus fails to reject.
Command
mkdir -p /tmp/cve130771/img && cd /tmp/cve130771/img && mknod dev_node c 1 3 2>/dev/null || sudo mknod dev_node c 1 3 && tar -cvf /tmp/cve130771/malicious-image.tar dev_node && echo 'Import as image metadata into Incus <7.6.0 to test' Cleanup
rm -f /tmp/cve130771/img/dev_node /tmp/cve130771/malicious-image.tar; rmdir /tmp/cve130771/img 2>/dev/null; rm -rf /tmp/cve130771 Expected Telemetry
Creation of a character-device special file during unpack is recorded by auditd/osquery with process incusd.
Expected Detection
The device/special-file branch of the queries fires on special-file creation under the storage pool.
Builds a tar backup containing a hard link to a sensitive root-owned file, simulating hard-link following during Incus restore.
Command
mkdir -p /tmp/cve130771/hl && cd /tmp/cve130771/hl && cp /etc/hostname realfile && ln realfile hardlink_to_real && tar -cvf /tmp/cve130771/malicious-hl.tar --hard-dereference=no realfile hardlink_to_real && echo 'Import into Incus <7.6.0 restricted project to test hard-link handling' Cleanup
rm -rf /tmp/cve130771 Expected Telemetry
Hard-link creation event with initiating process incusd is captured during unpack.
Expected Detection
The hard-link branch of the queries fires on HardLinkCreated/hardlink actions within the storage pool.