CVE Professor
/
All CVEs
CVE-2026-136976

CVE-2026-136976 — Canonical LXD (4.0.16) — CWE-22

HIGH CVSS 8.5 CVE.org

Improper link resolution before file access in recursive file pull in Canonical LXD before 4.0.15, 5.0.11, 5.21.9, and 6.8 on case-insensitive client filesystems allows an authenticated user with write access to an instance directory or custom volume to write arbitrary files outside the target directory and execute code as the operator via case-variant symlinks.

Improper link resolution before file access in recursive file pull in Canonical LXD before 4.0.15, 5.0.11, 5.21.9, and 6.8 on case-insensitive client filesystems allows an authenticated user with write access to an instance directory or custom volume to write arbitrary files outside the target directory and execute code as the operator via case-variant symlinks.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction Active UI:A
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. None VA:N
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Path Traversal and Symlink Following flaw (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) in Canonical LXD's recursive file pull mechanism.

Technical Flaw Analysis:
The core issue lies in how LXD handles symbolic links during a recursive file transfer operation (specifically, when pulling files from an instance/volume to the host or another location, or potentially pushing, but the description specifies "write arbitrary files outside the target directory... via case-variant symlinks").

1. Case-Insensitive Filesystem Dependency: The vulnerability is exploitable on case-insensitive client filesystems (e.g., macOS APFS/HFS+, Windows NTFS). On these systems, File.txt and file.txt are treated as the same inode.
2. Improper Link Resolution: When LXD performs a recursive pull, it likely resolves symlinks to determine their target paths. If an attacker creates a symlink with a name that differs only in case from a legitimate file or directory, or if the symlink target itself contains case-variant characters that bypass a naive string comparison check, the LXD process may resolve the symlink to a path outside the intended sandboxed directory.
3. Missing Canonicalization Check: The software fails to properly canonicalize the final resolved path against the allowed base directory after symlink resolution, specifically accounting for case-insensitivity. It likely checks if the path starts with the allowed prefix using a case-sensitive string comparison, which fails on case-insensitive filesystems if the attacker manipulates the case of the symlink name or target.
4. Privilege Context: The LXD daemon runs with elevated privileges (typically root or a dedicated lxd user with significant capabilities). Writing a file outside the instance directory allows the attacker to place files in critical system locations (e.g., /etc/cron.d, /root/.ssh/authorized_keys, or LXD's own configuration files) leading to code execution as the operator.

CVSS Vector Interpretation:
AV:N/AC:L/AT:N/PR:N/UI:A: Network vector, low complexity, no attack required, no privileges required (initially), but User Interaction: Active is required. This suggests the attacker must trick a user (or an automated process acting on user input) into initiating the file pull operation, or the "authenticated user" mentioned in the description refers to the LXD API user who triggers the pull. Correction based on description: The description says "allows an authenticated user with write access...". This contradicts PR:N in the vector. However, CVSS 4.0 PR:N might refer to the initial network access not requiring auth, but the exploit requires an authenticated LXD API token. Let's re-read carefully: "allows an authenticated user... to write...". The CVSS vector PR:N is likely a misclassification in the provided data or refers to the fact that the vulnerability itself* doesn't require OS-level auth, just LXD API auth. Given UI:A, it implies a user must be convinced to perform an action (e.g., "Pull this file from my instance").

  • VC:H/VI:H/VA:N: High Confidentiality and Integrity impact. No Availability impact.

  • SC:N/SI:N/SA:N: No scope change.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Identify LXD Installation: Use network scanning (Nmap) to identify the LXD API port (default 8443).
  • Version Fingerprinting: Query the LXD API endpoint /1.0 or /1.0/cluster to determine the version. Confirm it is 4.0.16, 5.0.11, 5.21.9, or 6.8 (or earlier unpatched versions).
  • Filesystem Check: Determine if the host running LXD uses a case-insensitive filesystem. This is harder remotely but can be inferred if the host is macOS or Windows. For Linux hosts, this vulnerability is not exploitable via this specific case-variant symlink method (Linux ext4/btrfs are case-sensitive). Note: The CVE explicitly states "on case-insensitive client filesystems".*
  • Credential Acquisition: Obtain valid LXD API credentials (client certificate or token) for a user with write access to an instance or custom volume. This could be via phishing, credential stuffing, or a compromised user account.
  • 2. Exploitation

    Prerequisites:
  • Attacker has LXD API access with write permissions to an instance/volume.
  • Host filesystem is case-insensitive (e.g., macOS).
  • Attacker can create files/symlinks inside the instance/volume.
  • Step-by-Step Exploitation (Illustrative PoC):

    1. Create Malicious Symlink in Instance:
    The attacker uses the LXD API to create a symbolic link inside the instance's filesystem. The symlink's name or target is crafted to exploit case-insensitivity.

    Example: Suppose the allowed directory is /var/snap/lxd/common/lxd/storage-pools/default/instances/myinstance/rootfs/.
    The attacker creates a file secret.txt in the instance.
    Then, they create a symlink Secret.txt (different case) pointing to /etc/cron.d/evil.

    Wait, the description says "write arbitrary files outside the target directory... via case-variant symlinks". This implies the pull operation follows the symlink and writes the content of the symlinked file to the destination, but the path resolution is flawed.

    More Accurate Mechanism:
    The attacker creates a directory structure in the instance:

    /instance/rootfs/
        ├── legit_dir/
        │   └── file.txt
        └── Legit_Dir/  (Case-variant directory name)
            └── symlink -> /etc/cron.d/evil

    When the user initiates a "recursive pull" of /instance/rootfs/, LXD traverses the directories. On a case-insensitive FS, legit_dir and Legit_Dir might be treated as the same or cause confusion in the path construction logic. If LXD constructs the destination path using the case-variant name from the filesystem but checks permissions against the canonical name, or if it resolves the symlink symlink -> /etc/cron.d/evil and writes the content of file.txt (or the symlink itself) to the resolved path, it could write to /etc/cron.d/evil.

    Alternative Interpretation (More Likely):
    The attacker creates a symlink link in the instance pointing to /etc/passwd.
    The attacker names the symlink LINK (case-variant).
    The pull operation is triggered. LXD reads LINK, resolves it to /etc/passwd, and attempts to write the content to the destination. If the destination path construction is flawed due to case-insensitivity, it might write to an unintended location.

    However, the description says "write arbitrary files outside the target directory". This suggests the destination path is manipulated.

    Refined PoC (Illustrative):
    1. Attacker creates a file payload.sh in the instance.
    2. Attacker creates a symlink payload.SH (case-variant) pointing to payload.sh.
    3. Attacker triggers a recursive pull of the instance directory to a local directory on the host.
    4. Due to case-insensitivity, the LXD process might resolve the symlink payload.SH to a path that, when combined with the base directory, escapes the sandbox. For example, if the base directory is /home/user/pulls/ and the symlink is named ../../etc/cron.d/evil (but case-variant tricks are used to bypass a simple startsWith check).

    Actually, the most common case-variant symlink attack on case-insensitive FS is:
    1. Create a directory dir in the instance.
    2. Create a symlink dir/link -> /etc/cron.d/evil.
    3. Rename dir to DIR (case-variant).
    4. Trigger pull. The path becomes .../DIR/link. If the security check compares .../dir/link (lowercase) against the allowed base, it might pass, but the actual file system operation uses .../DIR/link, which resolves to /etc/cron.d/evil.

    Curl Example (Illustrative):

    # 1. Create instance (if not exists)
        curl -k --cert client.crt --key client.key https://localhost:8443/1.0/instances -d '{"name":"vuln-test"}'
    
        # 2. Create malicious symlink structure inside the instance
        # This requires executing commands inside the instance or using the LXD API to create files.
        # Assuming we can create files via the API or exec:
        curl -k --cert client.crt --key client.key -X POST https://localhost:8443/1.0/instances/vuln-test/exec -d '{"command":["mkdir","-p","/tmp/evil"],"user":"root"}'
        curl -k --cert client.crt --key client.key -X POST https://localhost:8443/1.0/instances/vuln-test/exec -d '{"command":["ln","-s","/etc/cron.d/evil","/tmp/evil/link"],"user":"root"}'
        
        # 3. Trigger the recursive pull (Exact API endpoint for pull is not specified in CVE, this is illustrative)
        # The user (or attacker with API access) initiates a pull of /tmp/evil to a host directory.
        curl -k --cert client.crt --key client.key -X POST https://localhost:8443/1.0/instances/vuln-test/files -d '{"path":"/tmp/evil","type":"dir"}'
        # Note: The actual "pull" operation might be a different API call or a client-side action triggered by the user.

    3. Post-Exploitation

  • Code Execution: If the attacker successfully writes a file to /etc/cron.d/, they can schedule a cron job that executes arbitrary commands as root (or the LXD user).
  • Persistence: The cron job provides persistent access.
  • Lateral Movement: With root access on the LXD host, the attacker can compromise all instances, access the host's network, and pivot to other systems.
  • 🌍 Real World Impact

  • Confidentiality (High): The attacker can read sensitive files on the host (e.g., /etc/shadow, SSH keys, LXD configuration) by writing a script that exfiltrates them.
  • Integrity (High): The attacker can modify system files, install backdoors, or alter LXD configurations to maintain access.
  • Availability (None): The vulnerability does not directly cause denial of service, but the attacker could disable services or delete critical files.
  • Practical Consequences:
  • * Complete Host Compromise: An attacker with LXD API access can gain root access to the LXD host. * Cross-Instance Escape: The attacker can escape the container/instance sandbox and compromise the underlying host. * Data Breach: Sensitive data stored on the host or in other instances can be stolen. * Supply Chain Attack: If the LXD host is used to build or deploy other systems, the attacker can tamper with those artifacts.

    🛡️ Remediation & Mitigation

    Exact Affected Versions & Upgrade Recommendation

  • Affected: Canonical LXD versions before 4.0.15, 5.0.11, 5.21.9, and 6.8.
  • Remediation: Upgrade to the latest stable version of LXD that includes the fix. For LXD 4.0, upgrade to 4.0.15 or later. For LXD 5.0, upgrade to 5.0.11 or later. For LXD 5.21, upgrade to 5.21.9 or later. For LXD 6.8, upgrade to the patched version (likely 6.8.1 or later, check Canonical's release notes).
  • Actionable Workarounds

    1. Disable Recursive File Pull: If possible, disable the recursive file pull feature via LXD configuration or API restrictions. 2. Restrict API Access: Limit LXD API access to trusted users only. Use strong authentication (client certificates) and disable password-based authentication if possible. 3. Use Case-Sensitive Filesystem: If running on a case-insensitive filesystem (macOS, Windows), consider migrating to a case-sensitive filesystem (e.g., APFS with case-sensitive option, or Linux ext4) if feasible. 4. Network Segmentation: Isolate the LXD host from untrusted networks. Use firewalls to restrict access to the LXD API port (8443) to specific IP addresses.

    Detection

  • Log Monitoring: Monitor LXD logs for unusual file pull operations, especially those involving symlinks or case-variant paths.
  • File Integrity Monitoring (FIM): Use tools like AIDE or Tripwire to monitor critical system directories (e.g., /etc/cron.d, /root/.ssh) for unauthorized changes.
  • IoCs:
  • * New cron jobs in /etc/cron.d/ or /var/spool/cron/. * New SSH keys in /root/.ssh/authorized_keys. * Unusual LXD API calls to the /files endpoint with recursive flags. * Symlinks in instance directories pointing to absolute paths outside the instance.

    ⚠️ Urgency

  • CVSS Score: 8.5 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: Low (AC:L), but requires user interaction (UI:A) and specific filesystem conditions (case-insensitive).
  • Patching Priority: High. While not in CISA KEV, the high CVSS score and the potential for complete host compromise make this a critical vulnerability. Organizations should prioritize patching, especially if they run LXD on case-insensitive filesystems (macOS, Windows) or have untrusted users with LXD API access. If running on Linux (case-sensitive), the risk is lower, but patching is still recommended to prevent other potential path traversal issues.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Canonical LXD"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-136976
CVSS Score
8.5 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
Canonical:LXD (4.0.16)
References & Advisories (1)
Related CVEs
7.5
CVE-2026-45693
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, the static file c
5.4
CVE-2026-145190
Wiki.js 3.0.0 before 3.3.0 contains an authorization bypass vulnerability that allows authenticated users to m
5.4
CVE-2026-145192
Wiki.js 3.0.0 before 3.3.0 contains an authorization bypass vulnerability that allows authenticated users to c
7.1
CVE-2026-143090
In the Linux kernel, the following vulnerability has been resolved: xen/pvcalls: unwind pvcalls_new_active_so
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L