{"id":"GHSA-g3vv-g2j5-45f2","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)","aliases":["CVE-2022-2584","GHSA-967g-cjx4-h7j6","GO-2022-0422"],"modified":"2026-01-23T22:53:27.674526Z","published":"2022-04-08T22:08:45Z","database_specific":{"cwe_ids":["CWE-119"],"github_reviewed_at":"2022-04-08T22:08:45Z","github_reviewed":true,"nvd_published_at":null,"severity":"HIGH"},"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"}],"affected":[{"package":{"name":"github.com/ipld/go-codec-dagpb","ecosystem":"Go","purl":"pkg:golang/github.com/ipld/go-codec-dagpb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.3.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/04/GHSA-g3vv-g2j5-45f2/GHSA-g3vv-g2j5-45f2.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}