Incus CVE-2026-41684
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to Incus daemon
-
DeliveryPrepare crafted backup archive with valid inline config and malformed legacy YAML
-
ExploitSubmit backup for import
-
InstallPass preflight validation
-
C2Extract archive to filesystem
-
ExecuteReparse legacy backup.yaml
-
ImpactDereference nil Container field
-
Step 8Crash daemon
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | An authenticated user account with explicit 'backup.import' or equivalent permission on the Incus instance is required. The vulnerability is triggered only during instance restore or backup import operations, not during normal daemon operation. Default Incus installations without backup import policies restrict this to administrators or designated backup operators. The crafted backup must contain a syntactically valid backup/index.yaml file that passes initial YAML parsing (this ensures the first-stage validation succeeds and the daemon begins extraction), combined with a malformed backup/container/backup.yaml file with a missing container section. Non-admin users without backup import permissions cannot trigger this vulnerability. The crash occurs post-extraction during configuration update, so the archive must be successfully delivered to the daemon and extraction must begin before the nil dereference happens. |
| Impact | Real-world risk is MODERATE despite the 6.5 CVSS score. Exploitation requires authenticated access with explicit backup import permissions (PR:L in CVSS vector), significantly narrowing the threat surface. The attack is non-interactive (UI:N) and deterministic once a crafted backup is delivered. The vulnerability causes only denial of service (A:H, C:N, I:N) with no confidentiality or integrity impact - the daemon crashes after archive extraction has begun, potentially leaving partial restore state but not enabling privilege escalation or data exfiltration. CVSS vector (AV:N/AC:L/PR:L) is accurate: network-accessible service with low complexity exploitation once authentication is obtained. No KEV status or public POC exploitation reported in references, but proof-of-concept test case with multiple scenarios (empty YAML, pool-only, volume-only) is documented in the advisory, confirming crash reproducibility. This is a 'crash if you can authenticate and import a backup' issue rather than widespread remote exploitation risk, making it a moderate priority for defenders with exposed Incus instances accepting untrusted backups. |
| Exploit ScenarioDerived | An authenticated Incus user with backup import permissions crafts a tar archive with a valid backup/index.yaml containing a complete container configuration, paired with a malformed backup/container/backup.yaml file that omits the container section entirely. The user submits this archive for restoration via the Incus API. The daemon validates the inline config (preflight passes), begins archive extraction, then attempts to reparse the legacy backup.yaml from the restored filesystem. When UpdateInstanceConfig() or internalImportFromBackup() unconditionally accesses Container.Devices, a nil pointer dereference occurs and the Incus daemon crashes. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Denial of service in Incus daemon via nil pointer dereference when restoring backup archives with valid inline backup/index.yaml but malformed legacy backup/container/backup.yaml omitting the container section. An authenticated user with backup import permissions can crash the daemon by crafting a backup archive that passes preflight validation but triggers nil dereference during the restore phase after archive extraction. CVSS 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) - confirmed by 7asecurity with proof-of-concept test cases.
RemediationAI
Upgrade to Incus v7.0.0 or later, which includes validation to ensure the Container struct is present in parsed backup YAML before any dereference. The patch centralizes backup-config validation in ParseConfigYamlFile() and downstream consumers (UpdateInstanceConfig() and internalImportFromBackup()) to return an explicit error 'No container struct in the backup file found' if Container is nil. As a temporary workaround on systems unable to upgrade immediately, restrict backup import permissions to fully trusted administrators and implement network-level access controls to limit who can submit backup archives to the Incus daemon. Note that restricting imports does not eliminate the vulnerability - only patching provides a complete fix. Administrators should test the upgrade in non-production environments before deploying to production backup infrastructure.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Incus backup restoration uses a two-stage YAML parsing mechanism: backup.GetInfo() first attempts to parse inline backup/index.yaml from the archive, and only falls back to the legacy backup/container/backup.yaml if the inline config is absent. The ParseConfigYamlFile() function accepts YAML documents with no container section without validation, returning a Config struct with nil Container field. Multiple restore consumers (UpdateInstanceConfig() in backup_config_utils.go and internalImportFromBackup() in api_internal.go) check for nil Container conditionally but later unconditionally dereference Container.Devices and Container.ExpandedDevices, triggering runtime panic. The root cause is CWE-476 (null pointer dereference) due to missing struct validation after YAML unmarshaling.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/lxc/incus).
CVSS VectorVendor: https://github.com/lxc/incus
DescriptionCVE.org
Summary
Details
It was found that backup.GetInfo() trusts the inline backup/index.yaml config when present and only falls back to parsing the legacy backup/container/backup.yaml file if result.Config == nil. As a result, an archive can carry a valid inline config that passes the initial import preflight while also carrying a malformed legacy backup/container/backup.yaml file that is reparsed later from the restored file system.
ParseConfigYamlFile() accepts YAML documents with no container section, and multiple downstream consumers then dereference .Container without checking for nil. Confirmed examples in the instance restore and import flow include backup.UpdateInstanceConfig() and internalImportFromBackup().
An authenticated user with permission to import instance backups may be able to crash the Incus daemon with a crafted backup archive whose inline backup/index.yaml is valid but whose extracted legacy backup.yaml omits container. The crash occurs in the restore path after archive extraction has begun.
The flow is as follows: A crafted backup archive contains a valid backup/index.yaml file together with a malformed backup/container/backup.yaml file that omits the container section. backup.GetInfo() parses backup/index.yaml successfully, so bInfo.Config is populated from the inline config. Because result.Config != nil, GetInfo() does not fall back to backup/container/backup.yaml. instances_post.go then builds the request from bInfo.Config.Container, which succeeds because the inline config is valid. Later, storage unpack extracts backup/container/backup.yaml into the instance volume as <mountPath>/backup.yaml. backend.go then calls backup.UpdateInstanceConfig(..., mountPath), which reparses <mountPath>/backup.yaml through ParseConfigYamlFile(). Because ParseConfigYamlFile() accepts YAML with no container section, backup.Container == nil, and later access to backup.Container.Devices or backup.Container.ExpandedDevices can trigger a nil-pointer dereference.
Affected Files:
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_info.go#L87
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_info.go#L115
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_config_utils.go#L85
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_config_utils.go#L159
- https://github.com/lxc/incus/blob/v6.22.0/internal/server/storage/backend.go#L809
- https://github.com/lxc/incus/blob/v6.22.0/cmd/incusd/api_internal.go#L749
The initial backup-metadata parser prefers inline backup/index.yaml content:
Affected Code:
if hdr.Name == backupIndexPath {
err = yaml.NewDecoder(tr).Decode(&result)The legacy backup/container/backup.yaml file is only parsed if the inline config is absent:
Affected Code:
if result.Config == nil && hdr.Name == "backup/container/backup.yaml" {
err = yaml.NewDecoder(tr).Decode(&result.Config)ParseConfigYamlFile() accepts an empty YAML document, or one with no container section, without validation:
Affected Code:
func ParseConfigYamlFile(path string) (*config.Config, error) {
data, err := os.ReadFile(path)
...
backupConf := config.Config{}
err = yaml.Unmarshal(data, &backupConf)UpdateInstanceConfig() conditionally uses backup.Container at first but later dereferences it unconditionally:
Affected Code:
if backup.Container != nil {
backup.Container.Name = b.Name
backup.Container.Project = b.Project
}
if updateRootDevicePool(backup.Container.Devices, pool.Name) {
rootDiskDeviceFound = true
}
if updateRootDevicePool(backup.Container.ExpandedDevices, pool.Name) {
rootDiskDeviceFound = true
}Another confirmed sink is present in internalImportFromBackup():
Affected Code:
if allowNameOverride {
backupConf.Container.Name = instName
}
if instName != backupConf.Container.Name {
return fmt.Errorf("Instance name requested %q doesn't match instance name in backup config %q", instName, backupConf.Container.Name)
}This was confirmed as follows:
Command:
go test ./test/fuzz -run='TestExtractedBackupYAMLMissingContainerNilDereference' -count=1 -vOutput:
=== RUN TestExtractedBackupYAMLMissingContainerNilDereference
=== RUN TestExtractedBackupYAMLMissingContainerNilDereference/legacy_backup_empty
extracted_backup_yaml_poc_test.go:70: UpdateInstanceConfig panicked on malformed extracted
backup.yaml (container is nil): runtime error: invalid memory address or nil pointer
dereference
=== RUN TestExtractedBackupYAMLMissingContainerNilDereference/legacy_backup_pool_only
extracted_backup_yaml_poc_test.go:70: UpdateInstanceConfig panicked on malformed extracted
backup.yaml (container is nil): runtime error: invalid memory address or nil pointer
dereference
=== RUN TestExtractedBackupYAMLMissingContainerNilDereference/legacy_backup_volume_only
extracted_backup_yaml_poc_test.go:70: UpdateInstanceConfig panicked on malformed extracted
backup.yaml (container is nil): runtime error: invalid memory address or nil pointer
dereference
--- FAIL: TestExtractedBackupYAMLMissingContainerNilDereference (0.21s)
FAILIt is recommended to validate the parsed legacy backup.yaml structure before any dereference and to fail with a standard error if Container is missing:
Proposed Fix:
if backup.Container == nil {
return errors.New("No container struct in the backup file found")
}That validation should be added at minimum in: backup.UpdateInstanceConfig() and internalImportFromBackup() before any backupConf.Container.* access
More broadly, it is recommended to centralize backup-config validation so that both inline backup/index.yaml and extracted legacy backup.yaml files are checked against the same structural requirements before any restore or import consumer uses them.
A patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0.
Credit
This issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
GHSA-x5r6-jr56-89pv
NVD
CVE.org
EPSS
Exploit-DB