☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Canonical logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 9.9 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H 🐛 CWE-22
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-66897

CVE-2026-66897 Path Traversal in Canonical
📅 PUBLISHED: 2026-08-24 00:00 UTC 🔄 UPDATED: 2026-10-02 00:00 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.72%
👁️
0.72% probability
17.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: UK License: Commercial
Affected: Lxd — upgrade to patched release
CVSS VECTOR BREAKDOWN 9.9
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: H Confidentiality High
I: H Integrity High
A: H Availability High
9.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-66897 is a critical path traversal vulnerability in LXD's instance template processing, enabling an attacker with container edit permissions — or any user able to launch a crafted image — to escape directory confinement and overwrite arbitrary files on the host system as root. The flaw stems from a TOCTOU-style discrepancy between path validation (performed against a confined os.Root handle) and subsequent file creation (performed with an unconfined os.Create call using a string path). Successful exploitation results in host root code execution, with a CVSS 3.1 base score of 9.9 and no confirmed patch currently available. All LXD deployments that expose container management interfaces to untrusted users are affected until patched.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability resides in LXD's instance template processing pipeline. When an instance is created from an image, LXD reads the image's metadata.yaml file, which can specify target template paths. These paths are meant to be confined to the instance's root directory. LXD performs a validation step against a confined os.Root directory handle — a directory file descriptor (openat-style) that restricts path resolution to within a designated subtree. This validation is intended to prevent template targets from escaping the instance's filesystem.

However, the attack succeeds because LXD subsequently opens and creates the file using os.Create with an unconfined string path. The path used in this second operation is not resolved relative to the os.Root handle but is passed directly to the OS-level file creation call. This creates a fundamental discrepancy between the checks performed during the validation phase (which operate on the resolved, confined path) and the operations performed during the file-creation phase (which operate on the raw, unconfined string).

This is a classic Time-of-Check/Time-of-Use (TOCTOU) vulnerability class, but with a twist: instead of a race window, the flaw is a static inconsistency — two different path-resolution mechanisms are used at check and use time. An attacker who can control the template path string can craft a path that passes the initial confined validation (e.g., appearing to be relative to the instance root) but, when interpreted as a raw string path by os.Create, escapes the root and traverses to arbitrary host locations.

For example, a path containing traversal sequences such as ../../../../etc/cron.d/malicious would be trapped by the confined os.Root check if properly resolved, but if the validation is performed on a manipulated form and the creation uses the untrusted string verbatim (or with insufficient canonicalization), the file write lands outside the intended directory. Because LXD daemon runs as root, the file is created with root ownership and root privileges.

The attack surface is broad: any user with container-edit permissions within an existing LXD environment, or any user capable of launching an image (whether from a trusted or semi-trusted source, including images pulled from remote registries), can trigger the vulnerable code path. In multi-tenant or shared LXD deployments, this means a low-privileged user (hence CVSS PR:L) can escalate to full host root compromise.

No code-level specifics beyond the os.Root and os.Create calls are provided in the NVD description; the precise function names and call sites within LXD's source are not disclosed. The vulnerability is unpatched with zero patch confidence, meaning no fixing commit, advisory, or release has been identified from any tracked source.


Exploitation Scenarios

No public exploit or PoC is available for CVE-2026-66897. The following attack chain is inferred from the vulnerability class (CWE-22 path traversal combined with TOCTOU-style check/use inconsistency) and the NVD description. Specific implementation details are not available and are not fabricated.

Step 1 — Reconnaissance/Target Identification: An attacker identifies an LXD host that is reachable — either over the network via the LXD REST API or locally via the Unix socket. The attacker must have valid, low-privileged credentials permitting access to the container management interface, or must identify an image repository (public or internal) where they can publish or modify a metadata.yaml file. Publicly accessible LXD instances, or shared environments where users are granted container-editing or image-launching privileges, are primary targets.

Step 2 — Triggering the Vulnerability: The attacker crafts a malicious image containing a metadata.yaml file with a target template path that includes path traversal sequences (e.g., ../../../../...). This crafted path is engineered so that it passes the initial os.Root-confined validation check but, upon being used by os.Create as a raw string path, resolves outside the instance root directory. Alternatively, if the attacker has edit permissions on an existing container, they modify the instance's template configuration to inject the same malicious path. No authenticated high privilege is required beyond container-edit or image-launch capability, consistent with the CVSS vector's Low privilege requirement.

Step 3 — Payload/Execution: When LXD processes the malicious template, it writes a file to the attacker-controlled path on the host. Because os.Create runs with the LXD daemon's root privileges, the file is created as root. The attacker selects a target path that yields code execution — for example, writing a cron job into /etc/cron.d/, a systemd unit into /etc/systemd/system/, an SSH key into a root-authorized keys file, or a modification to an existing root-executed script. The exact payload is limited only by what arbitrary root file writes can achieve.

Step 4 — Post-Exploitation Impact: Upon the next scheduled execution (cron), service reload (systemd), or login (SSH key), the attacker achieves host root code execution. Full host compromise is immediate: the attacker can read all host data, access other containers and their data, pivot laterally across the network, install persistent backdoors, and potentially compromise the entire underlying infrastructure. Due to the container/host boundary crossing, breakouts of this nature typically expose all tenants in shared deployments.

It is acceptable and prudent to note that the precise exploitation mechanics may differ from the above chain, as the NVD description does not specify exact function names, parameter structures, or the internal call sequence beyond the os.Root/os.Create distinction.


Impact Assessment

CVE-2026-66897 carries a CVSS 3.1 base score of 9.9 (Critical) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. The key observations:

  • Attack Vector (AV:N): Network-exploitable, meaning the LXD API is reachable remotely — not just trusted local administrators.
  • Attack Complexity (AC:L): No special conditions or races are required beyond the inherent check/use inconsistency; low complexity.
  • Privileges Required (PR:L): Only a low-privileged account with container-edit or image-launch rights is needed — not root, not administrative access to the host.
  • User Interaction (UI:N): None.
  • Scope (S:C): The impact crosses security boundaries — from the container to the host, and potentially to other containers and the underlying host OS.
  • Confidentiality/Integrity/Availability (C:H/I:H/A:H): Complete compromise of host files, total integrity loss due to arbitrary root file overwrites, and availability impact from potentially destructive writes (e.g., overwriting critical system files).

Business impact: For organizations running LXD as a container management platform — especially in multi-tenant environments, CI/CD pipelines, or as a hypervisor alternative — this vulnerability enables trivial privilege escalation from low-privileged tenant/footprint to full host root. Service downtime, data theft, lateral movement, and infrastructure takeover are all plausible outcomes. The lack of any patch or vendor advisory at the time of writing elevates the urgency: affected deployments have no vendor-provided remediation path and must rely on mitigation-only controls.

Blast radius: Any LXD host exposing the management interface to users who lack full administrative trust is exposed. In clustered LXD deployments, the blast radius extends across the cluster if the compromised host's credentials or trust relationships are reused. Additionally, if the compromised host participates in a broader orchestration platform (e.g., Kubernetes with a containerd/LXD runtime), the compromise may propagate further.


Detection Guidance

Detection for CVE-2026-66897 should focus on: (1) anomalous file writes to host-sensitive paths (e.g., /etc/, /usr/, /root/) originating from the LXD daemon process, (2) unusual template metadata containing path traversal sequences, and (3) abnormal process execution shortly after LXD instance operations. All rules below are heuristic and should be tuned to local environment baselines.

Sigma Rule

title: LXD Template Path Traversal - Suspicious Host File Writes
id: 5f79d3c5-2a3b-4c1e-9d8a-7b6e5f4a3c2d
status: experimental
description: Detects file writes to sensitive host directories from the LXD daemon process, potentially indicating CVE-2026-66897 path traversal exploitation.
references:
    - CVE-2026-66897
logsource:
    category: file_event
    product: linux
detection:
    selection:
        Image|endswith:
            - '/lxd'
            - '/lxd-bridge'
            - '/containerd'
        TargetFilename|startswith:
            - '/etc/cron.d/'
            - '/etc/systemd/system/'
            - '/etc/rc.d/'
            - '/etc/init.d/'
            - '/root/.ssh/'
            - '/usr/local/bin/'
            - '/usr/bin/'
            - '/usr/sbin/'
            - '/bin/'
            - '/sbin/'
        TargetFilename|endswith:
            - '.service'
            - '.sh'
            - '.conf'
            - '.py'
            - '.cron'
            - '.key'
    condition: selection
falsepositives:
    - Legitimate LXD operations that write to host paths (rare, usually only during setup)
level: high

YARA Rule

rule LXD_Template_PathTraversal_Payload
{
    meta:
        author = "ValtersIT Threat Intel"
        description = "Detects malicious LXD image metadata.yaml files containing path traversal sequences targeting host directories"
        cve = "CVE-2026-66897"
        date = "2026-04-10"

    strings:
        $a1 = "metadata.yaml"
        $a2 = "template" nocase
        $a3 = "target" nocase
        $b1 = "../../"
        $b2 = "..\\..\\"
        $c1 = "/etc/cron.d/"
        $c2 = "/etc/systemd/system/"
        $c3 = "/root/.ssh/"
        $c4 = "/usr/local/bin/"
        $c5 = "/etc/init.d/"

    condition:
        uint16(0) == 0x0A0D or uint32(0) == 0x0A0D0A0D or filesize > 100 and
        all of ($a*) and 1 of ($b*) and 1 of ($c*)
}

Suricata IDS Rule

alert http any any -> $LXD_SERVERS any (msg:"CVE-2026-66897 LXD Template Path Traversal Attempt"; flow:to_server,established; content:"metadata.yaml"; nocase; content:"template"; nocase; within:200; content:"../../"; distance:0; content:"/etc/"; distance:0; classtype:attempted-admin; sid:202666897; rev:1; reference:cve,2026-66897;)

Note: This rule targets HTTP-based LXD REST API traffic carrying image/template uploads containing traversal indicators. For Unix-socket-only deployments, rely on Sigma/file-event rules.

Elastic Detection

file where event.action in ("write", "create") and
    process.name in ("lxd", "lxd-bridge", "containerd") and
    (
        file.path : ("/etc/cron.d/*", "/etc/systemd/system/*", "/etc/init.d/*",
                     "/etc/rc.d/*", "/root/.ssh/*", "/usr/local/bin/*",
                     "/usr/bin/*", "/usr/sbin/*", "/bin/*", "/sbin/*")
    ) and
    not file.path : ("/var/lib/lxd/*", "/var/lib/lxd-bridge/*")

Splunk SPL Query

index=linux_file_events sourcetype=linux:audit OR sourcetype=linux:file
| search ((process_name=lxd OR process_name=lxd-bridge OR process_name=containerd)
    AND (file_path="/etc/cron.d/*" OR file_path="/etc/systemd/system/*"
         OR file_path="/etc/init.d/*" OR file_path="/root/.ssh/*"
         OR file_path="/usr/local/bin/*" OR file_path="/usr/bin/*"
         OR file_path="/usr/sbin/*"))
| stats count by host, process_name, file_path, user
| where count > 1
| table _time, host, process_name, file_path, user, count

Wazuh OSSEC Rule

<group name="lxd,">
    <rule id="668970" level="12">
        <decoded_as>syslog</decoded_as>
        <match>lxd</match>
        <regex>template</regex>
        <regex>\.\./\.\./</regex>
        <description>CVE-2026-66897: LXD template path traversal indicators detected in logs</description>
        <mitre>
            <id>T1190</id>
        </mitre>
        <group>lxd_exploit,</group>
    </rule>

    <rule id="668971" level="15">
        <if_sid>668970</if_sid>
        <regex>\/etc\/|\/root\/|cron\.d|systemd</regex>
        <description>CVE-2026-66897: LXD path traversal targeting sensitive host paths - possible exploitation</description>
        <mitre>
            <id>T1543</id>
            <id>T1098</id>
        </mitre>
        <group>lxd_exploit,</group>
    </rule>
</group>

Note on detection tooling: Given the TOCTOU nature of this flaw, log-based detection of the actual file write is the most reliable indicator. Successful exploitation will result in a root-owned file in a sensitive host directory — a highly unusual event for the LXD process — making the file-event rules above potentially high-fidelity with proper baseline tuning.


Mitigation & Patch Guidance

Patch status confirmed: UNPATCHED (0/4 confidence). No vendor advisory, fixing commit, security release, or third-party patch has been identified from any tracked source. Deployments must assume they remain vulnerable until official remediation is released.

1) Immediate Mitigations (no patch available)

  • Restrict API exposure: If the LXD REST API is bound to a network interface, block external access via firewall rules. Bind the API to localhost only (lxc config set core.https_address 127.0.0.1:8443) where remote management is not essential.
  • Enforce least privilege: Audit all users and API keys with container-edit or image-launch permissions. Remove these privileges from any untrusted or semi-trusted accounts. In multi-tenant environments, revoke image-launch rights for arbitrary users; only allow trusted administrators to launch images from verified sources.
  • Vet image sources: Disable automatic image pulls from untrusted or community repositories. Use only internally vetted, signed images; verify image integrity and maintain a curated allow-list of registries.
  • Monitor filesystem events: Deploy the detection rules above to alert on anomalous root-level file writes by the LXD daemon. Immediate alerting can enable rapid containment if a compromised host is identified.
  • Containerize LXD itself (belt-and-braces): Run the LXD daemon inside a virtual machine or an additional containment layer where a host-root compromise is less impactful.
  • Consider downgrading or isolation: Until a patch exists, evaluate whether non-essential LXD instances can be virtualized rather than containerized, or whether the management plane can be taken offline.

2) Patch/Upgrade Steps

  • Monitor Canonical's LXD release channels (GitHub releases, the LXD mailing list, Snap Store) daily for a security advisory mentioning CVE-2026-66897.
  • Do not blindly upgrade to the newest minor version — wait until a fix is officially announced, then test in a staging environment before production rollout.
  • Once patched, verify the fix by: (a) reading the advisory, (b) checking the changelog for path-resolution hardening, and (c) running a controlled exploit test (crafted image with traversal path) in a sandbox to confirm it no longer succeeds.
  • Maintain version lock with automated update deferral so a silent regressive update does not occur during the unpatched window.

3) Long-Term Hardening

  • Adopt a trust model for container images: Implement image signing (e.g., Cosign/Sigstore) and enforcing admission controllers that reject unsigned images or images lacking provenance.
  • Harden the host filesystem: Use SELinux/AppArmor confined profiles for LXD (LXD ships AppArmor profiles by default; verify they are active). Restrict write access to sensitive host directories via additional MAC policies on the LXD daemon.
  • Segment privileges: Run the LXD management API with distinct service accounts per tenant where feasible; ensure audit logging of all management operations.
  • Establish incident response runbooks: Predefine containment steps (API shutdown, network isolation, evidence snapshot) so an alert can be actioned in minutes, not hours.
  • Implement file integrity monitoring: Deploy FIM on host-critical paths (/etc/, /root/, /usr/) to detect unauthorized changes immediately, regardless of the process causing them.

References

  1. NVD Entry: CVE-2026-66897 — https://nvd.nist.gov/vuln/detail/CVE-2026-66897 (official vulnerability record; unchanged until vendor disclosure).
  2. LXD GitHub Repository: https://github.com/canonical/lxd (monitor the releases page for future security updates and patch commits; no fix available as of this report).
  3. CWE-22 — Improper Limitation of a Pathname to a Restricted Directory: https://cwe.mitre.org/data/definitions/22.html (weakness class documentation).
  4. MITRE ATT&CK — T1190 Exploit Public-Facing Application: https://attack.mitre.org/techniques/T1190/ (tactical classification for this exploitation scenario).

Threat actor campaigns / exploit-in-the-wild evidence: None reported. CVE-2026-66897 is not listed on CISA's Known Exploited Vulnerabilities catalog (KEV) and has no publicly available PoC or active exploitation observed in the wild as of the report date. Given the criticality and the container-escape potential, active exploitation should be considered likely once a PoC is published; treat any unpatched LXD deployment as a potential target.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

lxd socket
canonical lxd
LXD 5

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-66897/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.