Vulnerabilities in pkg:golang/github.com/ipld/go-ipld-prime
PACKAGECVE-2026-42328 is a MODERATE (CVSS 6.2) go-ipld-prime's dag-cbor and dag-json decoders vulnerability (CWE-674: Uncontrolled Recursion) affecting Github.com/ipld/go ipld prime libraries in the Go ecosystem. The issue involves go-ipld-prime's dag-cbor and dag-json decoders have unbounded recursion depth. Remediation is available by upgrading affected packages to version 0.23.0.
pkg:golang/github.com/ipld/go-ipld-prime
Vulnerability advisories affecting package pkg:golang/github.com/ipld/go-ipld-prime. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w239-58x2-q8p5 | CVE-2026-42328 | MODERATE | go-ipld-prime's DAG-CBOR and DAG-JSON decoders have unbounded recursion depth |
| GHSA-378j-3jfj-8r9f | CVE-2026-35480 | MODERATE | go-ipld-prime: DAG-CBOR decoder unbounded memory allocation from CBOR headers |
| GHSA-c653-6hhg-9x92 | CVE-2023-22460 | MODERATE | go-ipld-prime/codec/json may panic if asked to encode bytes |
CVE-2026-42328 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-42328
To remediate this vulnerability, upgrade all affected Github.com/ipld/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.23.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-42328, inspect your project dependencies for Github.com/ipld/go ipld prime:
inspect dependencies for github.com/ipld/go-ipld-prime
Analyze the terminal output to locate any version of Github.com/ipld/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.23.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-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Github.com/ipld/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-42328 Affected Github.com/ipld/go ipld prime Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ipld/go-ipld-prime
|
Go |
< 0.23.0
|
0.23.0
|
References
Frequently Asked Questions
What is CVE-2026-42328?
Which Github.com/ipld/go ipld prime versions are affected?
What version fixes CVE-2026-42328?
Is github.com/ipld/go-ipld-prime affected?
What is the CVSS score of CVE-2026-42328?
What CWE is associated with CVE-2026-42328?
How can I check Go dependencies for CVE-2026-42328?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w239-58x2-q8p5",
"modified" : "2026-06-08T23:47:37Z",
"published" : "2026-05-07T02:07:21Z",
"aliases" : [ "CVE-2026-42328" ],
"summary" : "go-ipld-prime's DAG-CBOR and DAG-JSON decoders have unbounded recursion depth",
"details" : "The DAG-CBOR and DAG-JSON decoders recurse on each nested map or list without a depth limit. A payload containing deeply nested collections causes the decoder to recurse once per level, growing the goroutine stack until the Go runtime terminates the process with a fatal stack overflow (distinct from a recoverable panic).\n\nFor DAG-CBOR, a payload of approximately 2 MB, consisting of repeated `0x81` (array-of-1) bytes followed by a terminator, produces around 2 million recursion frames and reliably exhausts Go's default 1 GB goroutine stack. The existing allocation budget does not prevent this: each nested collection header costs only a handful of budget units, so the stack is exhausted before the budget is. DAG-JSON has equivalent exposure via `[[[...]]]`-style payloads; it has no budget system and is therefore unprotected against recursion depth as well.\n\nSchema-free decoding (using `basicnode.Prototype.Any`) allows arbitrary nesting depth. Schema-bound decoding bounds nesting only when the schema itself is non-recursive and contains no fields typed as `Any`; schemas with recursive type references or any `Any`-typed fields permit unconstrained nesting at those points.\n\nThe fix adds a configurable `MaxDepth` option to both decoders, defaulting to 1024 nested levels. The decoder returns `ErrDecodeDepthExceeded` when a payload nests beyond the limit. Well-formed IPLD data rarely approaches this depth in practice; the default is generous for legitimate use while preventing stack exhaustion.",
"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.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ipld/go-ipld-prime/security/advisories/GHSA-w239-58x2-q8p5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42328"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ipld/go-ipld-prime"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-07T02:07:21Z",
"nvd_published_at" : "2026-05-27T18:16:22Z"
}
}