{"api_version":"1","generated_at":"2026-07-23T15:05:24+00:00","cve":"CVE-2022-23495","urls":{"html":"https://cve.report/CVE-2022-23495","api":"https://cve.report/api/cve/CVE-2022-23495.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23495","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23495"},"summary":{"title":"CVE-2022-23495","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-12-08 22:15:00","updated_at":"2023-11-07 03:44:00"},"problem_types":["CWE-252"],"metrics":[],"references":[{"url":"https://github.com/ipfs/go-merkledag/pull/91","name":"https://github.com/ipfs/go-merkledag/pull/91","refsource":"MISC","tags":[],"title":"feat: check that the CidBuilder hasher is usable by rvagg · Pull Request #91 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/ipfs/go-merkledag/issues/90","name":"https://github.com/ipfs/go-merkledag/issues/90","refsource":"MISC","tags":[],"title":"`(*ProtoNode).RawData` use incorrectly panic instead of returning · Issue #90 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://en.wikipedia.org/wiki/Directed_acyclic_graph","name":"https://en.wikipedia.org/wiki/Directed_acyclic_graph","refsource":"MISC","tags":[],"title":"Directed acyclic graph - Wikipedia","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","name":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","refsource":"MISC","tags":[],"title":"ProtoNode may be modified such that common method calls may panic · Advisory · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/ipfs/go-merkledag/pull/93","name":"https://github.com/ipfs/go-merkledag/pull/93","refsource":"MISC","tags":[],"title":"feat: improve broken cid.Builder testing for CidBuilder by rvagg · Pull Request #93 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/ipfs/go-merkledag/pull/92","name":"https://github.com/ipfs/go-merkledag/pull/92","refsource":"MISC","tags":[],"title":"feat: check links on setting and sanitise on encoding by rvagg · Pull Request #92 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0","name":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0","refsource":"MISC","tags":[],"title":"Release v0.8.0 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/ipfs/kubo/issues/9297","name":"https://github.com/ipfs/kubo/issues/9297","refsource":"MISC","tags":[],"title":"`ipfs add` with exotic hash functions panics (the daemon and the client) · Issue #9297 · ipfs/kubo · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1","name":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1","refsource":"MISC","tags":[],"title":"Release v0.8.1 · ipfs/go-merkledag · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23495","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23495","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"23495","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"protocol","cpe5":"go-merkledag","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2022-23495","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-755: Improper Handling of Exceptional Conditions","cweId":"CWE-755"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"ipfs","product":{"product_data":[{"product_name":"go-merkledag","version":{"version_data":[{"version_value":">= 0.4.0, < 0.8.1","version_affected":"="}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"},{"url":"https://github.com/ipfs/go-merkledag/issues/90","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/issues/90"},{"url":"https://github.com/ipfs/kubo/issues/9297","refsource":"MISC","name":"https://github.com/ipfs/kubo/issues/9297"},{"url":"https://github.com/ipfs/go-merkledag/pull/91","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/pull/91"},{"url":"https://github.com/ipfs/go-merkledag/pull/92","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/pull/92"},{"url":"https://github.com/ipfs/go-merkledag/pull/93","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/pull/93"},{"url":"https://en.wikipedia.org/wiki/Directed_acyclic_graph","refsource":"MISC","name":"https://en.wikipedia.org/wiki/Directed_acyclic_graph"},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0"},{"url":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1","refsource":"MISC","name":"https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"}]},"source":{"advisory":"GHSA-x39j-h85h-3f46","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}]}},"nvd":{"publishedDate":"2022-12-08 22:15:00","lastModifiedDate":"2023-11-07 03:44:00","problem_types":["CWE-252"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:protocol:go-merkledag:*:*:*:*:*:*:*:*","versionStartIncluding":"0.4.0","versionEndExcluding":"0.8.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"23495","Ordinal":"226364","Title":"CVE-2022-23495","CVE":"CVE-2022-23495","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"23495","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}