{"schemaVersion":3,"id":"CVE-2022-23495","aliases":["GHSA-x39j-h85h-3f46","GO-2022-1155"],"status":"published","duplicateOf":null,"title":null,"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.0138,"percentile":0.71703,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.068,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01312},"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":0.71703}],"last30":[{"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":0.71703}]},"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, which can prevent it from detecting unexpected states and conditions.","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}],"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}],"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}],"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}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T09:52:58.745Z","stale":false,"partial":false}}