Skip to main content

Incus CVE-2026-41648

MEDIUM
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-05-04 https://github.com/lxc/incus GHSA-67wx-r9xr-x75x
5.3
CVSS 4.0 · Vendor: https://github.com/lxc/incus
View

Attack ChainAIDerived

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

  1. Access
    Authenticate to Incus API
  2. Delivery
    Create tar archive with oversized YAML entry in header
  3. Exploit
    Upload tar via image or backup API endpoint
  4. Execution
    Daemon extracts tar and invokes yaml.NewDecoder
  5. Persist
    Decoder allocates 5-6x memory without limit
  6. Impact
    Out-of-memory condition or service degradation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
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

The vulnerability requires authenticated API access to Incus with permissions to upload image or backup tar archives. The exploit triggers only when processing tar entries named metadata.yaml (or ./metadata.yaml) in image uploads or backup/index.yaml and backup/container/backup.yaml in backup restores. The attacker must craft a tar archive in which the target YAML file header declares a size larger than the daemon's available memory; typical exploitation scenarios assume 1 MB to 10 MB entries to avoid triggering upload bandwidth bottlenecks. No special daemon configuration is required-the vulnerability is present in default installations. Non-default configurations with strict resource limits (cgroups, memory quotas) may limit exposure but do not eliminate it. The vulnerability does NOT require user interaction beyond the initial API call to upload the archive.

Impact

CVSS vector and score are not provided in the advisory, limiting formal quantitative risk assessment. However, risk evaluation using available signals is straightforward: CWE-770 (resource exhaustion) combined with denial-of-service impact tags indicates medium to high severity. Authentication requirement is a significant limiting factor-the vulnerability explicitly requires appropriate API permissions to upload images or backup archives, meaning only authenticated users can exploit this. This eliminates unauthenticated remote exploitation risk and narrows the threat model to insider threats, compromised credentials, or intentional service administrators. Attack complexity is low once authenticated (craft a tar with oversized YAML entry, upload via API). Practical exploitation faces a mitigating factor: upload bandwidth becomes the bottleneck for delivering large payloads, meaning an attacker must sustain substantial network throughput to trigger the 1.2 GB allocation scenario (200 MB file × 6x amplification). The memory amplification is linear rather than exponential, making it predictable and defensible compared to billion-laughs-style attacks. No KEV status, POC code, or exploit tool has been identified at the time of analysis. The vulnerability is real and affecting production Incus installations but is not presently showing signs of active exploitation in the wild. Organizations running Incus on constrained infrastructure (small memory budgets, shared hosting) or accepting untrusted image uploads face higher risk. Default configurations are vulnerable.

Exploit ScenarioDerived

An authenticated attacker (or malicious administrator) crafts a tar archive containing a metadata.yaml file with a large declared size in the tar header (e.g., 200 MB) but minimal actual content. When the attacker uploads this archive to the Incus daemon via the image or backup API, the daemon extracts the archive, reaches the metadata.yaml entry, and calls yaml.NewDecoder(tr).Decode() without size limits. The YAML decoder allocates 5-6x the declared size (~1.2 GB for the 200 MB example) to parse the file. On a daemon with limited available memory, this triggers an out-of-memory condition, crashing the daemon or causing severe performance degradation that blocks legitimate container operations.

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

Incus versions up to 6.23.0 allow authenticated users to trigger denial of service by uploading crafted image or backup tarballs containing oversized YAML metadata files that consume excessive server memory during parsing. When metadata.yaml or backup/index.yaml entries declare large sizes in the tar header, the YAML decoder reads and allocates 5-6x the input size without limits, potentially exhausting memory on constrained daemons; a 200 MB YAML entry may trigger 1.2 GB of heap allocations. Vendor-released patch available in v7.0.0.

RemediationAI

Upgrade Incus to v7.0.0 or later, which includes a patch implementing size checks on tar entry headers before YAML decoding and wrapping the tar reader in io.LimitReader with a 1 MB maximum. The vendor-released patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0. For organizations unable to patch immediately, the following compensating controls are available: (1) Restrict API access to trusted users only-revoke image and backup upload permissions from untrusted accounts, reducing the threat model to insider threats (side effect: may block legitimate administrative operations if access controls are overly restrictive); (2) Monitor daemon process memory consumption and restart the daemon on sustained high memory usage to recover from denial of service (side effect: temporary service interruption and data loss if backups are in-flight); (3) Deploy Incus on hosts with sufficient memory overhead and swap to absorb the 1-6x memory amplification without crashing (side effect: performance degradation during attacks as garbage collection pressure increases, affecting concurrent container operations); (4) Limit tar entry sizes at the application boundary using middleware to reject uploads exceeding a reasonable metadata size threshold such as 10 MB (side effect: may block legitimate large metadata in edge cases, requires careful tuning). Patching remains the primary and strongly recommended remediation.

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

Incus, a container management system, processes user-uploaded image and backup tar archives by extracting and parsing YAML metadata files (metadata.yaml and backup/index.yaml) using Go's gopkg.in/yaml.v2 decoder. The vulnerability stems from CWE-770 (Allocation of Resources Without Limits or Throttling): the code calls yaml.NewDecoder(tr).Decode() directly on the tar reader without checking the tar entry header size (hdr.Size) or wrapping the reader in io.LimitReader. While yaml.v2 includes built-in mitigation for YAML bomb attacks (billion laughs via excessive aliasing), large flat YAML documents with numerous keys or long string values still produce linear memory amplification of approximately 5-6x. The affected code paths are in cmd/incusd/images.go (getImageMetadata function at line 1456) and internal/server/backup/backup_info.go (GetInfo function at lines 87 and 115). CPE affected: pkg:go/github.com_lxc_incus_v6_cmd_incusd vulnerable through version 6.23.0.

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 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE 3.1 LOW
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L

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

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
May 07, 2026 - 14:22 NVD
5.3 (MEDIUM)

DescriptionCVE.org

Summary

User provided image and backup tarballs would be unpacked and YAML files parsed without any size restrictions. This was making it easy for an authenticated user to provide a crafted image or backup tarball that when parsed by Incus would lead to a very large YAML document being loaded into memory, potentially causing the entire server to run out of memory.

Details

It was found that getImageMetadata and backup.GetInfo call yaml.NewDecoder(tr).Decode() directly on the tar reader without limiting how many bytes the YAML decoder can consume. The tar entry hdr.Size is not checked before decoding.

A tar archive can be crafted in which metadata.yaml or backup/index.yaml declares a large size in the tar header, causing the YAML decoder to read and allocate proportional memory on the server. The gopkg.in/yaml.v2 library mitigates YAML alias and anchor bombs, such as “billion laughs,” through its built-in excessive-aliasing check. However, large flat YAML documents with many keys or long string values can still produce linear but amplified memory consumption of approximately 5x to 6x the input size.

A 200 MB tar entry for metadata.yaml may cause approximately 1.2 GB of heap allocations during decode, which may be sufficient to trigger an out-of-memory condition on a constrained daemon or significantly degrade service. Because the decode occurs in the daemon process, excessive garbage-collection pressure can affect concurrent operations. Appropriate API permissions are required to upload an image or backup archive.

Mitigating factors include the fact that the amplification is linear rather than exponential, at approximately 5x to 6x, and that upload bandwidth is the practical bottleneck for delivering large payloads.

Affected Files:

  • https://github.com/lxc/incus/blob/v6.22.0/cmd/incusd/images.go#L1456
  • 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

Image metadata parsing reads YAML directly from the tar stream: Affected Code:

if hdr.Name == "metadata.yaml" || hdr.Name == "./metadata.yaml" {
    err = yaml.NewDecoder(tr).Decode(&result)

Backup info parsing does the same:

Affected Code:

if hdr.Name == backupIndexPath {
    err = yaml.NewDecoder(tr).Decode(&result)

if result.Config == nil && hdr.Name == "backup/container/backup.yaml" {
    err = yaml.NewDecoder(tr).Decode(&result.Config)

This was confirmed as follows:

Command:

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

Output:

=== RUN   TestUnboundedYAMLMetadataDecode
   image_metadata_poc_test.go:80: metadata.yaml size: 10.2 MB
   image_metadata_poc_test.go:113: metadata.yaml hdr.Size = 10688940 bytes (10.2 MB) -- no size
       check exists in getImageMetadata before yaml.NewDecoder(tr).Decode()
   image_metadata_poc_test.go:124: decoded 50000 properties from 10.2 MB metadata.yaml
   image_metadata_poc_test.go:125: yaml.NewDecoder(tr).Decode() accepted 10.2 MB metadata.yaml
       with 50000 properties -- no hdr.Size check or io.LimitReader in images.go:1457 or
       backup_info.go:88
--- FAIL: TestUnboundedYAMLMetadataDecode (0.11s)
FAIL

It is recommended to add a size check on hdr.Size before YAML decoding and to wrap the tar reader in io.LimitReader.

Proposed Fix:

const maxMetadataSize = 1 << 20 // 1 MB

if hdr.Size > maxMetadataSize {
    return nil, fmt.Errorf("metadata entry too large: %d bytes", hdr.Size)
}

err = yaml.NewDecoder(io.LimitReader(tr, maxMetadataSize)).Decode(&result)

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

EPSS Score
0.0%
Top 87% 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

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

Attack Technique

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: Low

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