GHSA-67wx-r9xr-x75x — incusd
MEDIUMGHSA-67wx-r9xr-x75x is a medium-severity (CVSS 5) CWE-770 vulnerability in github.com/lxc/incus/v6/cmd/incusd. No vendor fix is recorded yet; mitigation options are listed below.
Incus has Unbounded YAML Metadata Decode via Parsing
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-67wx-r9xr-x75x.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-67wx-r9xr-x75x plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/lxc/incus/v6/cmd/incusdReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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/)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lxc/incus/v6/cmd/incusd | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lxc/incus/v6/cmd/incusd, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
No patched version of github.com/lxc/incus/v6/cmd/incusd has shipped for GHSA-67wx-r9xr-x75x yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-67wx-r9xr-x75x can be triaged on real exposure rather than presence alone.
Tailored to GHSA-67wx-r9xr-x75x. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-67wx-r9xr-x75x in your dependencies?
O3 Security finds GHSA-67wx-r9xr-x75x across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.