Skip to main content

Incus CVE-2026-41647

MEDIUM
NULL Pointer Dereference (CWE-476)
2026-05-04 https://github.com/lxc/incus GHSA-fwj8-62r8-8p8m
6.5
CVSS 3.1 · Vendor: https://github.com/lxc/incus
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate to Incus
  2. Delivery
    Access S3 bucket import feature
  3. Exploit
    Craft truncated tar archive
  4. Install
    Upload malformed backup
  5. C2
    Trigger tar parsing
  6. Execute
    tr.Next() returns non-EOF error
  7. Impact
    hdr dereference with nil pointer
  8. Step 8
    Daemon panic
  9. Step 9
    Service disruption

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

Exploitation requires: (1) authenticated user credentials on the Incus system with permission to initiate S3 bucket import or restore operations, (2) ability to provide or control the backup archive content during bucket restore, and (3) S3 storage configured as a backend storage pool. The vulnerability does NOT trigger on valid, well-formed tar archives - it specifically requires a truncated or otherwise malformed archive that causes tar.Reader.Next() to return a non-EOF error after the first entry. This limits real-world exploitability compared to the raw CVSS score, as accidental truncated backups are unlikely and deliberate exploitation requires authenticated access and deliberate malicious input.

Impact

CVSS 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) reflects network-accessible availability impact requiring low complexity attack and authenticated user privileges. The vulnerability requires an authenticated Incus user to initiate S3 bucket import, which gates exploitation to users with Incus access. EPSS data not provided, but the narrow scope (authenticated-only, DoS-only, requires deliberate malformed archive upload) and lack of KEV status indicate this is lower-priority than remote unauthenticated RCE despite the 6.5 CVSS. The attack is non-automatable in practice - an attacker must craft a specific truncated tar file and convince an authenticated user to import it. Incident response priority depends on whether Incus instances are exposed to untrusted users or federation scenarios where remote actors could trigger bucket imports.

Exploit ScenarioDerived

An authenticated Incus user with S3 bucket restore permissions (or an attacker with compromised Incus credentials) uploads a specially crafted truncated tar archive as a storage bucket backup. During import, the TransferManager.UploadAllFiles function reads the tar entries, encounters the truncated archive, receives a non-EOF error on tr.Next(), and attempts to dereference a nil header pointer. The daemon panics, causing a denial of service until Incus is manually restarted. In a high-availability or federation scenario, an attacker could repeatedly crash daemon instances to disrupt service.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 04, 2026

Nil-pointer dereference in Incus daemon S3 storage bucket import allows authenticated users to crash the daemon by uploading a truncated or corrupted tar backup file. The TransferManager.UploadAllFiles function fails to handle non-EOF errors from tar parsing, causing a panic when hdr is nil. Vendor-released patch available in v7.0.0.

RemediationAI

Vendor-released patch: Incus v7.0.0 or later. Users running vulnerable versions should upgrade immediately to v7.0.0 or any subsequent release available at https://github.com/lxc/incus/releases/tag/v7.0.0. The fix implements proper non-EOF error handling in TransferManager.UploadAllFiles by checking if err != nil after each tr.Next() call before dereferencing the header. If immediate patching is not feasible, restrict S3 bucket import operations to trusted administrators only and monitor Incus daemon logs for panic events. Note that this vulnerability requires authenticated access, so network isolation of Incus control plane access provides defense-in-depth but is not a substitute for patching.

Affected Packages

go github.com/lxc/incus no fix
go github.com/lxc/incus/v6 no fix
go github.com/lxc/incus/v6/cmd/incusd no fix

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

The vulnerability exists in the S3 bucket restore functionality of Incus, specifically in the TransferManager.UploadAllFiles method located in internal/server/storage/s3/transfer_manager.go. The tar archive parsing loop uses Go's tar.Reader.Next() method to iterate through tar entries but only checks for io.EOF error conditions. When tr.Next() encounters a non-EOF error (such as unexpected EOF from a truncated or corrupted archive), the returned header pointer hdr is nil. The code then immediately dereferences hdr.Name without validating hdr is not nil, triggering a runtime panic. This is a missing error handling bug (CWE-476: Null Pointer Dereference) in the error path of tar archive processing.

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

Vendor (https://github.com/lxc/incus) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
SUSE MEDIUM

Primary rating from Vendor (https://github.com/lxc/incus).

CVSS VectorVendor: https://github.com/lxc/incus

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

Summary

Missing error handling could lead an authenticated Incus user to cause a daemon crash through the import of a truncated storage bucket backup file.

Details

It was found that TransferManager.UploadAllFiles iterates over tar entries but only checks for io.EOF from tr.Next(). When tr.Next() returns a non-EOF error, such as unexpected EOF from a truncated archive, the header hdr is nil and the code continues to access hdr.Name, causing a nil-pointer dereference that panics the daemon.

This may allow the Incus daemon to be crashed during S3 bucket restore if a truncated or corrupted backup archive is provided. A panic can occur when a malformed archive produces a non-EOF tar read error after the first entry. Any caller of UploadAllFiles that processes attacker-controlled archive content may be affected.

Affected File: https://github.com/lxc/incus/blob/v6.22.0/…server/storage/s3/transfer_manager.go#L127

The tar-iteration loop only checks for EOF:

Affected Code:

for {
    hdr, err := tr.Next()
    if err == io.EOF {
        break // End of archive.
    }

    // Skip index.yaml file
    if hdr.Name == "backup/index.yaml" {

When tr.Next() returns a non-EOF error, hdr is nil. The code does not check for this case and immediately dereferences hdr.Name.

This was confirmed as follows:

Command:

go test ./test/fuzz -run='FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar' -count=1 -v

Output:

=== RUN   FuzzS3BucketUploadTarParsing
=== RUN   FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar
   s3_bucket_upload_fuzz_test.go:82: UploadAllFiles panicked: runtime error: invalid memory address
       or nil pointer dereference
--- FAIL: FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar (0.00s)
FAIL

It is recommended to add a non-EOF error check after tr.Next().

Proposed Fix:

hdr, err := tr.Next()
if err == io.EOF {
    break
}

if err != nil {
    return fmt.Errorf("Error reading backup archive: %w", err)
}

A patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0.

Credits

This issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Affected Products (CPE)CVE.org

pkg:go/github.com_lxc_incus_v6_cmd_incusd

Vendor StatusVendor

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy