CVE-2026-35480: go-ipld-prime DAG-CBOR Decoder Unbounded Memory Allocation Vulnerability
MODERATECVE-2026-35480 is a MODERATE (CVSS 6.2) dag-cbor decoder unbounded memory allocation vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting go-ipld-prime libraries in the Go ecosystem. The issue involves dag-cbor decoder unbounded memory allocation from cbor headers. Remediation is available by upgrading affected packages to version 0.22.0.
CVE-2026-35480 at a Glance
Security Impact
CVSS: 6.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-35480
To remediate this vulnerability, upgrade all affected go-ipld-prime dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ipld/go-ipld-prime to 0.22.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ipld/go-ipld-prime
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-35480, inspect your project dependencies for go-ipld-prime:
inspect dependencies for github.com/ipld/go-ipld-prime
Analyze the terminal output to locate any version of go-ipld-prime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.22.0), 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 go-ipld-prime, 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
CVE-2026-35480 Affected go-ipld-prime Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ipld/go-ipld-prime
|
Go |
< 0.22.0
|
0.22.0
|
References
Frequently Asked Questions
What is CVE-2026-35480?
Which go-ipld-prime versions are affected?
What version fixes CVE-2026-35480?
Is github.com/ipld/go-ipld-prime affected?
What is the CVSS score of CVE-2026-35480?
What CWE is associated with CVE-2026-35480?
How can I check Go dependencies for CVE-2026-35480?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-378j-3jfj-8r9f",
"modified" : "2026-04-07T20:00:26Z",
"published" : "2026-04-06T23:08:24Z",
"aliases" : [ "CVE-2026-35480" ],
"summary" : "go-ipld-prime: DAG-CBOR decoder unbounded memory allocation from CBOR headers",
"details" : "The DAG-CBOR decoder uses collection sizes declared in CBOR headers as Go preallocation hints for maps and lists. The decoder does not cap these size hints or account for their cost in its allocation budget, allowing small payloads to cause excessive memory allocation.\n\nA CBOR map or list header can declare an arbitrarily large number of entries, causing the decoder to preallocate proportionally large backing structures before any entries are actually read. Because the allocation budget is only decremented as entries are decoded (not when sizes are declared), this cost is effectively invisible to the budget system. This is compounded by nesting: each level of a nested structure triggers its own unchecked preallocation while consuming minimal budget (one entry per parent level), so a payload under 100 bytes with 10 levels of nesting can cause over 9GB of allocation.\n\nSchema-free decoding (i.e. using `basicnode.Prototype.Any`) allows arbitrary nesting depth. Schema-bound decoding limits nesting to the schema's structure, but any field typed as `Any` in the schema permits unconstrained nesting within that field.\n\nThe fix caps the preallocation size hint to 1024 entries and decrements the allocation budget when collection sizes are declared. The declared length is still used for entry-count validation, and collections grow dynamically as entries are decoded, so correctly-formed data is unaffected, even beyond the preallocation limit.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ipld/go-ipld-prime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.22.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ipld/go-ipld-prime/security/advisories/GHSA-378j-3jfj-8r9f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35480"
}, {
"type" : "WEB",
"url" : "https://github.com/ipld/go-ipld-prime/commit/e43bf4a27055fe8d895671a731ee5041e2d983a9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ipld/go-ipld-prime"
}, {
"type" : "WEB",
"url" : "https://github.com/ipld/go-ipld-prime/releases/tag/v0.22.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-06T23:08:24Z",
"nvd_published_at" : "2026-04-07T15:17:45Z"
}
}