Search criteria

2 vulnerabilities found for go-merkledag by ipfs

CVE-2022-23495 (GCVE-0-2022-23495)

Vulnerability from cvelistv5 – Published: 2022-12-08 21:25 – Updated: 2025-04-23 16:31
VLAI?
Title
ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag
Summary
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.
CWE
  • CWE-755 - Improper Handling of Exceptional Conditions
Assigner
Impacted products
Vendor Product Version
ipfs go-merkledag Affected: >= 0.4.0, < 0.8.1
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T03:43:46.142Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/issues/90",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/issues/90"
          },
          {
            "name": "https://github.com/ipfs/kubo/issues/9297",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/kubo/issues/9297"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/91",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/91"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/92",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/92"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/93",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/93"
          },
          {
            "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-23495",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-04-23T15:48:01.494241Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-04-23T16:31:04.725Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "go-merkledag",
          "vendor": "ipfs",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 0.4.0, \u003c 0.8.1"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "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.\n"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "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"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-755",
              "description": "CWE-755: Improper Handling of Exceptional Conditions",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2022-12-08T21:25:40.257Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/issues/90",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/issues/90"
        },
        {
          "name": "https://github.com/ipfs/kubo/issues/9297",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/kubo/issues/9297"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/91",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/91"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/92",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/92"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/93",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/93"
        },
        {
          "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
          "tags": [
            "x_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",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
        }
      ],
      "source": {
        "advisory": "GHSA-x39j-h85h-3f46",
        "discovery": "UNKNOWN"
      },
      "title": "ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2022-23495",
    "datePublished": "2022-12-08T21:25:40.257Z",
    "dateReserved": "2022-01-19T21:23:53.766Z",
    "dateUpdated": "2025-04-23T16:31:04.725Z",
    "requesterUserId": "c184a3d9-dc98-4c48-a45b-d2d88cf0ac74",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

CVE-2022-23495 (GCVE-0-2022-23495)

Vulnerability from nvd – Published: 2022-12-08 21:25 – Updated: 2025-04-23 16:31
VLAI?
Title
ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag
Summary
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.
CWE
  • CWE-755 - Improper Handling of Exceptional Conditions
Assigner
Impacted products
Vendor Product Version
ipfs go-merkledag Affected: >= 0.4.0, < 0.8.1
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T03:43:46.142Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/issues/90",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/issues/90"
          },
          {
            "name": "https://github.com/ipfs/kubo/issues/9297",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/kubo/issues/9297"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/91",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/91"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/92",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/92"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/pull/93",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/pull/93"
          },
          {
            "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0"
          },
          {
            "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-23495",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-04-23T15:48:01.494241Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-04-23T16:31:04.725Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "go-merkledag",
          "vendor": "ipfs",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 0.4.0, \u003c 0.8.1"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "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.\n"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "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"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-755",
              "description": "CWE-755: Improper Handling of Exceptional Conditions",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2022-12-08T21:25:40.257Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/issues/90",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/issues/90"
        },
        {
          "name": "https://github.com/ipfs/kubo/issues/9297",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/kubo/issues/9297"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/91",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/91"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/92",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/92"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/pull/93",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/pull/93"
        },
        {
          "name": "https://en.wikipedia.org/wiki/Directed_acyclic_graph",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://en.wikipedia.org/wiki/Directed_acyclic_graph"
        },
        {
          "name": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0",
          "tags": [
            "x_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",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1"
        }
      ],
      "source": {
        "advisory": "GHSA-x39j-h85h-3f46",
        "discovery": "UNKNOWN"
      },
      "title": "ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2022-23495",
    "datePublished": "2022-12-08T21:25:40.257Z",
    "dateReserved": "2022-01-19T21:23:53.766Z",
    "dateUpdated": "2025-04-23T16:31:04.725Z",
    "requesterUserId": "c184a3d9-dc98-4c48-a45b-d2d88cf0ac74",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}