{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-23495","id":"CVE-2022-23495","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 i","descriptionLong":"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.\n","published":"2022-12-08T21:25:40.257Z","updated":"2026-10-28T02:30:46.162959830Z","reserved":"2022-01-19T21:23:53.766Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["ipfs go-merkledag"],"affectedProducts":[{"vendor":"ipfs","product":"go-merkledag","defaultStatus":null,"versions":[{"version":">= 0.4.0, < 0.8.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"github.com/ipfs/go-merkledag","purl":"pkg:golang/github.com/ipfs/go-merkledag","ranges":[">=0.4.0 <0.8.1"],"fixed":["0.8.1"],"advisory":"GHSA-x39j-h85h-3f46"}],"cwes":["CWE-755","CWE-252"],"aliases":["GHSA-x39j-h85h-3f46","GO-2022-1155"],"references":[{"url":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/ipfs/go-merkledag/issues/90","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","report","web"]},{"url":"https://github.com/ipfs/kubo/issues/9297","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","report","web"]},{"url":"https://github.com/ipfs/go-merkledag/pull/91","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/ipfs/go-merkledag/pull/92","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/ipfs/go-merkledag/pull/93","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://en.wikipedia.org/wiki/Directed_acyclic_graph","tags":["x_refsource_MISC","x_transferred","Technical Description","Third Party Advisory","web"]},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23495.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23495","tags":["advisory"]},{"url":"https://github.com/ipfs/go-merkledag","tags":["package"]},{"url":"https://pkg.go.dev/vuln/GO-2022-1155","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.01407,"epssPercentile":0.73281,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-23495","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23495","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-23495","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-x39j-h85h-3f46","ok":true,"note":"GHSA-x39j-h85h-3f46"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-23495","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}