CVE-2022-23495

ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag

HIGH
7.5
CVSS Score
Published: December 8, 2022 at 09:25 PM UTC
Updated: June 17, 2026 at 04:30 AM UTC
2 products affected across 2 vendorsGo MerkledagGo Merkledag

Using go-merkledag by ipfs?

Get instant alerts when new vulnerabilities affect go-merkledag - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 1%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0.4.0 ≤ v < 0.8.1
Affected range stops below 0.8.1, so it looks safe — our inference, not a vendor statement
v < 0.8.1
Affected range stops below 0.8.1, so it looks safe — our inference, not a vendor statement

References (9)

x_refsource_MISCTechnical DescriptionThird Party Advisory
https://en.wikipedia.org/wiki/Directed_acyclic_graph
x_refsource_MISCPatchThird Party Advisory
https://github.com/ipfs/go-merkledag/issues/90
x_refsource_MISCPatchThird Party Advisory
https://github.com/ipfs/go-merkledag/pull/91
x_refsource_MISCPatchThird Party Advisory
https://github.com/ipfs/go-merkledag/pull/92
x_refsource_MISCPatchThird Party Advisory
https://github.com/ipfs/go-merkledag/pull/93
x_refsource_MISCRelease NotesThird Party Advisory
https://github.com/ipfs/go-merkledag/releases/tag/v0.8.0
x_refsource_MISCRelease NotesThird Party Advisory
https://github.com/ipfs/go-merkledag/releases/tag/v0.8.1

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-755CWE-252

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card