CVE-2022-2584: Github.com/ipld/go codec dagpb Ipld/go-codec-dagpb Panics When Processing Certain Vulnerability
HIGHCVE-2022-2584 is a HIGH (CVSS 7.5) ipld/go-codec-dagpb panics when processing certain vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Github.com/ipld/go codec dagpb libraries in the Go ecosystem. The issue involves ipld/go-codec-dagpb panics when processing certain blocks. Remediation is available by upgrading affected packages to version 1.3.1.
CVE-2022-2584 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2022-2584
To remediate this vulnerability, upgrade all affected Github.com/ipld/go codec dagpb 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-codec-dagpb to 1.3.1
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-codec-dagpb
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-2584, inspect your project dependencies for Github.com/ipld/go codec dagpb:
inspect dependencies for github.com/ipld/go-codec-dagpb
Analyze the terminal output to locate any version of Github.com/ipld/go codec dagpb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Github.com/ipld/go codec dagpb, 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-2022-2584 Affected Github.com/ipld/go codec dagpb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ipld/go-codec-dagpb
|
Go |
< 1.3.1
|
1.3.1
|
References
Frequently Asked Questions
What is CVE-2022-2584?
Which Github.com/ipld/go codec dagpb versions are affected?
What version fixes CVE-2022-2584?
Is github.com/ipld/go-codec-dagpb affected?
What is the CVSS score of CVE-2022-2584?
What CWE is associated with CVE-2022-2584?
How can I check Go dependencies for CVE-2022-2584?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g3vv-g2j5-45f2",
"modified" : "2026-01-23T22:34:06Z",
"published" : "2022-04-08T22:08:45Z",
"aliases" : [ "CVE-2022-2584" ],
"summary" : "ipld/go-codec-dagpb panics when processing certain blocks",
"details" : "### Impact \nDecoding certain blocks using the go-ipld-prime version of the dag-pb codec (go-codec-dagpb) can cause a panic. The panic comes from an assumption that the reported link length is accurate, but if the block ends before that reported length then it’s a buffer overread.\n\n### Patches\nThe issue is fixed in v1.3.1 and above.\n\nConsumers can discover the versions of `go-codec-dagpb` in a module's dependency graph using the following command in the module root:\n\n```go mod graph | grep go-codec-dagpb```\n\n### Workarounds\nYou can work around this issue without upgrading by recovering panics higher in the call stack of the goroutine that calls the defective code.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Ask in [IPFS Discord #ipld-chatter](https://discord.gg/ipfs)\n* Open an issue in [go-codec-dagpb](https://github.com/ipld/go-codec-dagpb)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ipld/go-codec-dagpb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ipld/go-codec-dagpb/security/advisories/GHSA-g3vv-g2j5-45f2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-2584"
}, {
"type" : "WEB",
"url" : "https://github.com/ipld/go-codec-dagpb/commit/a17ace35cc760a2698645c09868f9050fa219f57"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0422"
}, {
"type" : "PACKAGE",
"url" : "github.com/ipld/go-codec-dagpb"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-08T22:08:45Z",
"nvd_published_at" : null
}
}