GSD-2022-23495

Vulnerability from gsd - Updated: 2023-12-13 01:19
Details
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.
Aliases
Aliases

{
  "GSD": {
    "alias": "CVE-2022-23495",
    "id": "GSD-2022-23495"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "aliases": [
        "CVE-2022-23495"
      ],
      "details": "go-merkledag implements the \u0027DAGService\u0027 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\u0027t 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.",
      "id": "GSD-2022-23495",
      "modified": "2023-12-13T01:19:35.420440Z",
      "schema_version": "1.4.0"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2022-23495",
        "STATE": "PUBLIC"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "go-merkledag",
                    "version": {
                      "version_data": [
                        {
                          "version_affected": "=",
                          "version_value": "\u003e= 0.4.0, \u003c 0.8.1"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "ipfs"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "go-merkledag implements the \u0027DAGService\u0027 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\u0027t 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."
          }
        ]
      },
      "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"
          }
        ]
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "cweId": "CWE-755",
                "lang": "eng",
                "value": "CWE-755: Improper Handling of Exceptional Conditions"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/issues/90",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/issues/90"
          },
          {
            "name": "https://github.com/ipfs/kubo/issues/9297",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/kubo/issues/9297"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/91",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/pull/91"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/92",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/pull/92"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/93",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/pull/93"
          },
          {
            "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
            "refsource": "MISC",
            "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
            "refsource": "MISC",
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
          }
        ]
      },
      "source": {
        "advisory": "GHSA-x39j-h85h-3f46",
        "discovery": "UNKNOWN"
      }
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003e=v0.4.0 \u003cv0.8.1",
          "affected_versions": "All versions starting from 0.4.0 before 0.8.1",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "cwe_ids": [
            "CWE-1035",
            "CWE-252",
            "CWE-937"
          ],
          "date": "2022-12-12",
          "description": "go-merkledag implements the \u0027DAGService\u0027 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\u0027t 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 does 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.",
          "fixed_versions": [
            "v0.8.1"
          ],
          "identifier": "CVE-2022-23495",
          "identifiers": [
            "CVE-2022-23495",
            "GHSA-x39j-h85h-3f46",
            "GMS-2022-8031"
          ],
          "not_impacted": "",
          "package_slug": "go/github.com/ipfs/go-merkledag",
          "pubdate": "2022-12-08",
          "solution": "Upgrade to version 0.8.1 or above.",
          "title": "Unchecked Return Value",
          "urls": [
            "https://nvd.nist.gov/vuln/detail/CVE-2022-23495",
            "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
            "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
            "https://github.com/ipfs/go-merkledag/pull/93",
            "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
            "https://github.com/ipfs/go-merkledag/pull/91",
            "https://github.com/ipfs/kubo/issues/9297",
            "https://github.com/ipfs/go-merkledag/pull/92",
            "https://github.com/ipfs/go-merkledag/issues/90",
            "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
            "https://github.com/advisories/GHSA-x39j-h85h-3f46"
          ],
          "uuid": "7e439eff-c941-4087-8dbf-dd30cdb984f9",
          "versions": [
            {
              "commit": {
                "sha": "8794146d52c211b8af0456e734a248649e636be0",
                "tags": [
                  "v0.4.0"
                ],
                "timestamp": "20210812152823"
              },
              "number": "v0.4.0"
            },
            {
              "commit": {
                "sha": "503ecaa8b898d65ddaee92ba8c6ae60b824004c1",
                "tags": [
                  "v0.8.1"
                ],
                "timestamp": "20221123224113"
              },
              "number": "v0.8.1"
            }
          ]
        },
        {
          "affected_range": "\u003c0",
          "affected_versions": "All versions starting from 0.4.0 before 0.8.1",
          "cwe_ids": [
            "CWE-1035",
            "CWE-937"
          ],
          "date": "2022-12-08",
          "description": "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\u0027t 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` and `github.com/ipfs/go-ipld-format` interfaces, certain methods, which internally require a re-encode if state has changed, will panic due to the inability to return an error. Additionally, use of the `ProtoNode#SetCidBuilder()` method to set a non-functioning `CidBuilder` (such as one that refers to a multihash where an implementation of that hash function is not available) may cause the same methods to panic as a new CID is required but cannot be created.",
          "fixed_versions": [
            "v0.8.1"
          ],
          "identifier": "GMS-2022-8031",
          "identifiers": [
            "GHSA-x39j-h85h-3f46",
            "GMS-2022-8031",
            "CVE-2022-23495"
          ],
          "not_impacted": "All versions before 0.4.0, all versions starting from 0.8.1",
          "package_slug": "go/github.com/ipfs/go-merkledag",
          "pubdate": "2022-12-08",
          "solution": "Upgrade to version 0.8.1 or above.",
          "title": "Duplicate of ./go/github.com/ipfs/go-merkledag/CVE-2022-23495.yml",
          "urls": [
            "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
            "https://github.com/ipfs/go-merkledag/issues/90",
            "https://github.com/ipfs/kubo/issues/9297",
            "https://github.com/ipfs/go-merkledag/pull/91",
            "https://github.com/ipfs/go-merkledag/pull/92",
            "https://github.com/ipfs/go-merkledag/pull/93",
            "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
            "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
            "https://github.com/advisories/GHSA-x39j-h85h-3f46"
          ],
          "uuid": "62b17fa7-5939-4c15-bc86-23e1a3d3cdf5",
          "versions": [
            {
              "commit": {
                "sha": "8794146d52c211b8af0456e734a248649e636be0",
                "tags": [
                  "v0.4.0"
                ],
                "timestamp": "20210812152823"
              },
              "number": "v0.4.0"
            },
            {
              "commit": {
                "sha": "503ecaa8b898d65ddaee92ba8c6ae60b824004c1",
                "tags": [
                  "v0.8.1"
                ],
                "timestamp": "20221123224113"
              },
              "number": "v0.8.1"
            }
          ]
        }
      ]
    },
    "nvd.nist.gov": {
      "configurations": {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:protocol:go-merkledag:*:*:*:*:*:*:*:*",
                "cpe_name": [],
                "versionEndExcluding": "0.8.1",
                "versionStartIncluding": "0.4.0",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      },
      "cve": {
        "CVE_data_meta": {
          "ASSIGNER": "security-advisories@github.com",
          "ID": "CVE-2022-23495"
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "en",
              "value": "go-merkledag implements the \u0027DAGService\u0027 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\u0027t 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": "en",
                  "value": "CWE-252"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
              "refsource": "MISC",
              "tags": [
                "Release Notes",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
              "refsource": "MISC",
              "tags": [
                "Release Notes",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/pull/93",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/pull/93"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
              "refsource": "MISC",
              "tags": [
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/pull/91",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/pull/91"
            },
            {
              "name": "https://github.com/ipfs/kubo/issues/9297",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/kubo/issues/9297"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/pull/92",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/pull/92"
            },
            {
              "name": "https://github.com/ipfs/go-merkledag/issues/90",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/ipfs/go-merkledag/issues/90"
            },
            {
              "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
              "refsource": "MISC",
              "tags": [
                "Technical Description",
                "Third Party Advisory"
              ],
              "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
            }
          ]
        }
      },
      "impact": {
        "baseMetricV3": {
          "cvssV3": {
            "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"
          },
          "exploitabilityScore": 3.9,
          "impactScore": 3.6
        }
      },
      "lastModifiedDate": "2022-12-12T17:46Z",
      "publishedDate": "2022-12-08T22:15Z"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…