CVE-2026-41648: Github.com/lxc/incus/v6/cmd/incusd Incus Has Unbounded YAML Metadata Vulnerability

MODERATE
Advisory Identifier: GHSA-67wx-r9xr-x75x
CVSS 5.0
CWE-770
Published
Advisory Summary

CVE-2026-41648 is a MODERATE (CVSS 5.0) incus has unbounded yaml metadata vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/lxc/incus/v6/cmd/incusd libraries in the Go ecosystem. The issue involves incus has unbounded yaml metadata decode via parsing. Remediation is available in the latest vendor maintenance releases.

CVE-2026-41648 at a Glance

CVE Identifier CVE-2026-41648
GHSA Identifier GHSA-67wx-r9xr-x75x
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/lxc/incus/v6/cmd/incusd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-41648

To remediate this vulnerability, upgrade all affected Github.com/lxc/incus/v6/cmd/incusd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/lxc/incus/v6/cmd/incusd fixed: Latest secure release
Upgrade github.com/lxc/incus/v6/cmd/incusd to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/lxc/incus/v6/cmd/incusd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41648, inspect your project dependencies for Github.com/lxc/incus/v6/cmd/incusd:

inspect dependencies for github.com/lxc/incus/v6/cmd/incusd

Analyze the terminal output to locate any version of Github.com/lxc/incus/v6/cmd/incusd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/lxc/incus/v6/cmd/incusd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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/)

CVE-2026-41648 Affected Github.com/lxc/incus/v6/cmd/incusd Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/lxc/incus/v6/cmd/incusd
Go
≤ 6.23.0

References

Frequently Asked Questions

What is CVE-2026-41648?
CVE-2026-41648 is a security vulnerability in Github.com/lxc/incus/v6/cmd/incusd involving Incus has Unbounded YAML Metadata Decode via Parsing under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/lxc/incus/v6/cmd/incusd versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/lxc/incus/v6/cmd/incusd.
What version fixes CVE-2026-41648?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/lxc/incus/v6/cmd/incusd affected?
Yes, github.com/lxc/incus/v6/cmd/incusd is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-41648?
CVE-2026-41648 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L.
What CWE is associated with CVE-2026-41648?
CVE-2026-41648 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2026-41648?
Run the dependency tree command: 'inspect dependencies for github.com/lxc/incus/v6/cmd/incusd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-67wx-r9xr-x75x",
  "modified" : "2026-05-08T21:47:16Z",
  "published" : "2026-05-04T19:44:24Z",
  "aliases" : [ "CVE-2026-41648" ],
  "summary" : "Incus has Unbounded YAML Metadata Decode via Parsing",
  "details" : "### Summary\nUser 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.\n\n### Details\nIt 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.\n\nA 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.\n\nA 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.\n\nMitigating 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.\n\nAffected Files:\n - https://github.com/lxc/incus/blob/v6.22.0/cmd/incusd/images.go#L1456\n - https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_info.go#L87\n - https://github.com/lxc/incus/blob/v6.22.0/internal/server/backup/backup_info.go#L115\n\nImage metadata parsing reads YAML directly from the tar stream:\nAffected Code:\n```\nif hdr.Name == \"metadata.yaml\" || hdr.Name == \"./metadata.yaml\" {\n    err = yaml.NewDecoder(tr).Decode(&result)\n```\n\nBackup info parsing does the same:\n\nAffected Code:\n```\nif hdr.Name == backupIndexPath {\n    err = yaml.NewDecoder(tr).Decode(&result)\n\nif result.Config == nil && hdr.Name == \"backup/container/backup.yaml\" {\n    err = yaml.NewDecoder(tr).Decode(&result.Config)\n```\n\nThis was confirmed as follows:\n\nCommand:\n```\ngo test ./test/fuzz -run='TestUnboundedYAMLMetadataDecode' -count=1 -v\n```\n\nOutput:\n```\n=== RUN   TestUnboundedYAMLMetadataDecode\n   image_metadata_poc_test.go:80: metadata.yaml size: 10.2 MB\n   image_metadata_poc_test.go:113: metadata.yaml hdr.Size = 10688940 bytes (10.2 MB) -- no size\n       check exists in getImageMetadata before yaml.NewDecoder(tr).Decode()\n   image_metadata_poc_test.go:124: decoded 50000 properties from 10.2 MB metadata.yaml\n   image_metadata_poc_test.go:125: yaml.NewDecoder(tr).Decode() accepted 10.2 MB metadata.yaml\n       with 50000 properties -- no hdr.Size check or io.LimitReader in images.go:1457 or\n       backup_info.go:88\n--- FAIL: TestUnboundedYAMLMetadataDecode (0.11s)\nFAIL\n```\n\nIt is recommended to add a size check on hdr.Size before YAML decoding and to wrap the tar reader in io.LimitReader.\n\nProposed Fix:\n```\nconst maxMetadataSize = 1 << 20 // 1 MB\n\nif hdr.Size > maxMetadataSize {\n    return nil, fmt.Errorf(\"metadata entry too large: %d bytes\", hdr.Size)\n}\n\nerr = yaml.NewDecoder(io.LimitReader(tr, maxMetadataSize)).Decode(&result)\n```\n\nA patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0.\n\n### Credit\nThis issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/lxc/incus/v6/cmd/incusd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "6.23.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lxc/incus/security/advisories/GHSA-67wx-r9xr-x75x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41648"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lxc/incus"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lxc/incus/releases/tag/v7.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-04T19:44:24Z",
    "nvd_published_at" : "2026-05-07T14:16:03Z"
  }
}