{"id":"CVE-2026-35480","aliases":["CVE-2026-35480","GHSA-378j-3jfj-8r9f","GO-2026-5073"],"related":[],"kind":"vulnerability","state":"published","title":"go-ipld-prime's DAG-CBOR decoder unbounded memory allocation from CBOR headers","summary":"go-ipld-prime is an implementation of the InterPlanetary Linked Data (IPLD) spec interfaces, a batteries-included codec implementations of IPLD for CBOR and JSON, and tooling for basic operations on IPLD objects. Prior to 0.22.0, 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. This vulnerability is fixed in 0.22.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"go-ipld-prime is an implementation of the InterPlanetary Linked Data (IPLD) spec interfaces, a batteries-included codec implementations of IPLD for CBOR and JSON, and tooling for basic operations on IPLD objects. Prior to 0.22.0, 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. This vulnerability is fixed in 0.22.0.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"DAG-CBOR decoder unbounded memory allocation from CBOR headers in github.com/ipld/go-ipld-prime","format":"markdown","source":"go"},{"lang":"es","text":"go-ipld-prime es una implementación de las interfaces de especificación de InterPlanetary Linked Data (IPLD), implementaciones de códecs de IPLD con todo incluido para CBOR y JSON, y herramientas para operaciones básicas en objetos IPLD. Antes de la versión 0.22.0, el decodificador DAG-CBOR utiliza los tamaños de colección declarados en las cabeceras CBOR como sugerencias de preasignación de Go para mapas y listas. El decodificador no limita estas sugerencias de tamaño ni tiene en cuenta su coste en su presupuesto de asignación, lo que permite que pequeñas cargas útiles causen una asignación excesiva de memoria. Esta vulnerabilidad se corrige en la versión 0.22.0.","source":"nvd"}],"published":"2026-04-06T23:08:24.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.2,"rating":"MEDIUM"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"version":"< 0.22.0","status":"affected"}],"vendor":"ipld","product":"go-ipld-prime","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.22.0"}],"ecosystem":"Go","package":"github.com/ipld/go-ipld-prime","purl":"pkg:golang/github.com/ipld/go-ipld-prime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.22.0"}],"ecosystem":"Go","package":"github.com/ipld/go-ipld-prime","purl":"pkg:golang/github.com/ipld/go-ipld-prime","source":"go"},{"ranges":[{"status":"affected","fixed":"0.22.0"}],"vendor":"protocol","product":"go-ipld-prime","cpe":"cpe:2.3:a:protocol:go-ipld-prime:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ipld/go-ipld-prime/security/advisories/GHSA-378j-3jfj-8r9f","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35480","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ipld/go-ipld-prime/commit/e43bf4a27055fe8d895671a731ee5041e2d983a9","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/ipld/go-ipld-prime","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/ipld/go-ipld-prime/releases/tag/v0.22.0","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-09T14:40:02.350Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35480","url":"https://www.cve.org/CVERecord?id=CVE-2026-35480","licence":"CVE Terms of Use","modified":"2026-04-09T14:40:11.103Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-378j-3jfj-8r9f","url":"https://github.com/advisories/GHSA-378j-3jfj-8r9f","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:42.408Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5073","url":"https://pkg.go.dev/vuln/GO-2026-5073","licence":"CC-BY-4.0","modified":"2026-07-07T20:30:13.620Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35480","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35480","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:18.106Z","epss":{"score":0.00166,"percentile":0.06067,"date":"2026-12-01T12:00:22.000Z"}}