{"cve":"CVE-2022-23495","nvd":{"published":"2022-12-08T22:15:10.233","modified":"2026-06-17T04:30:14.190","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-252","CWE-755"],"references":["https://en.wikipedia.org/wiki/Directed_acyclic_graph","https://github.com/ipfs/go-merkledag/issues/90","https://github.com/ipfs/go-merkledag/pull/91","https://github.com/ipfs/go-merkledag/pull/92","https://github.com/ipfs/go-merkledag/pull/93"],"products":["protocol:go-merkledag"],"source":"nvd","synced_at":"2026-10-19T21:37:28.463369388+00:00"},"epss":{"cve":"CVE-2022-23495","score":0.0138,"percentile":0.72125,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-x39j-h85h-3f46","url":"https://osv.dev/vulnerability/GHSA-x39j-h85h-3f46","summary":"go-merkledag's ProtoNode may be modified such that common method calls may panic","modified":"2023-11-08T04:08:19.256548Z","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"]}]},{"id":"GO-2022-1155","url":"https://osv.dev/vulnerability/GO-2022-1155","summary":"Panic in github.com/ipfs/go-merkledag","modified":"2024-05-20T16:03:47Z","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"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}