{"schemaVersion":4,"id":"CVE-2022-23495","aliases":["GHSA-x39j-h85h-3f46","GO-2022-1155"],"status":"published","duplicateOf":null,"title":"ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag","description":"go-merkledag implements the 'DAGService' interface and adds two ipld node types, Protobuf and Raw for the ipfs project. A `ProtoNode` may be modified in such a way as to cause various encode errors which will trigger a panic on common method calls that don't allow for error returns. A `ProtoNode` should only be able to encode to valid DAG-PB, attempting to encode invalid DAG-PB forms will result in an error from the codec. Manipulation of an existing (newly created or decoded) `ProtoNode` using the modifier methods did not account for certain states that would place the `ProtoNode` into an unencodeable form. Due to conformance with the [`github.com/ipfs/go-block-format#Block`](https://pkg.go.dev/github.com/ipfs/go-block-format#Block) and [`github.com/ipfs/go-ipld-format#Node`](https://pkg.go.dev/github.com/ipfs/go-ipld-format#Node) interfaces, certain methods, which internally require a re-encode if state has changed, will panic due to the inability to return an error. This issue has been addressed across a number of pull requests. Users are advised to upgrade to version 0.8.1 for a complete set of fixes. Users unable to upgrade may attempt to mitigate this issue by sanitising inputs when allowing user-input to set a new `CidBuilder` on a `ProtoNode` and by sanitising `Tsize` (`Link#Size`) values such that they are a reasonable byte-size for sub-DAGs where derived from user-input.","dates":{"published":"2022-12-08T21:25:40.257Z","modified":"2025-04-23T16:31:04.725Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01407,"percentile":0.73547,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0.02699999999999994,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.0138},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01312,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.01407,"percentile":0.73547}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.0138,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.01773,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.01407,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.01407,"percentile":0.73547}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions","description":"The product does not handle or incorrectly handles an exceptional condition.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/755.html"},{"id":"CWE-252","name":"Unchecked Return Value","description":"The product does not check the return value from a method or function.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Low","url":"https://cwe.mitre.org/data/definitions/252.html"}],"affected":[{"vendor":"github.com/ipfs","product":"go-merkledag","name":"github.com/ipfs/go-merkledag","label":"go-merkledag","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/ipfs/go-merkledag","purlType":"golang","versions":[{"text":"≥ 0.4.0, < 0.8.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.4.0","startInclusive":true,"end":"0.8.1","endInclusive":false}}],"versionsText":"≥ 0.4.0, < 0.8.1","eol":null,"hubHref":null},{"vendor":"ipfs","product":"go-merkledag","name":"go-merkledag","label":"go-merkledag","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.4.0, < 0.8.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.4.0","startInclusive":true,"end":"0.8.1","endInclusive":false}}],"versionsText":"≥ 0.4.0, < 0.8.1","eol":null,"hubHref":"/vendor/ipfs/go-merkledag"},{"vendor":"protocol","product":"go-merkledag","name":"go-merkledag","label":"go-merkledag","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.4.0, < 0.8.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.4.0","startInclusive":true,"end":"0.8.1","endInclusive":false}}],"versionsText":"≥ 0.4.0, < 0.8.1","eol":null,"hubHref":"/vendor/protocol/go-merkledag"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","label":"github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/issues/90","label":"github.com/ipfs/go-merkledag/issues/90","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Patch","Third Party Advisory"]},{"url":"https://github.com/ipfs/kubo/issues/9297","label":"github.com/ipfs/kubo/issues/9297","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Patch","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/pull/91","label":"github.com/ipfs/go-merkledag/pull/91","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/pull/92","label":"github.com/ipfs/go-merkledag/pull/92","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/pull/93","label":"github.com/ipfs/go-merkledag/pull/93","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://en.wikipedia.org/wiki/Directed_acyclic_graph","label":"en.wikipedia.org/wiki/Directed_acyclic_graph","hostname":"en.wikipedia.org","tags":["X Refsource MISC","WEB","Technical Description","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0","label":"github.com/ipfs/go-merkledag/releases/tag/v0.8.0","hostname":"github.com","tags":["X Refsource MISC","WEB","Release Notes","Third Party Advisory"]},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1","label":"github.com/ipfs/go-merkledag/releases/tag/v0.8.1","hostname":"github.com","tags":["X Refsource MISC","WEB","Release Notes","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23495","label":"nvd.nist.gov/vuln/detail/CVE-2022-23495","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/ipfs/go-merkledag","label":"github.com/ipfs/go-merkledag","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pkg.go.dev/vuln/GO-2022-1155","label":"pkg.go.dev/vuln/GO-2022-1155","hostname":"pkg.go.dev","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-12-08T21:25:40.257Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T16:31:04.725Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"prioritise","tag":"severe","reason":"Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)","nextStep":"Check applicability: affected before 0.8.1 (CNA); fix release not confirmed","rank":[0,0,0,0,1,75],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.01407,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2025-04-23T16:31:04.725Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1","headline":true},{"type":"cvss","source":"osv_go","date":"2025-04-23T16:31:04.725Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-04-23T16:31:04.725Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2025-04-23T15:48:01.494Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.01407,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T06:02:28.822Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T06:02:29.295Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T06:02:29.506Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T06:00:56.363Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T06:02:27.202Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T06:02:26.240Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T06:56:25.241Z","stale":false,"partial":false}}