CVE-2022-23495 json
ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag
published 3y ago modified 4mo ago also GHSA-x39j-h85h-3f46 , GO-2022-1155 , EUVD-2022-7766
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
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.
Patch / fix
- go github.com/ipfs/go-merkledag 0.8.1
- protocol go-merkledag 0.8.1
- github.com/ipfs/go-merkledag#91 pull request
- github.com/ipfs/go-merkledag#92 pull request
- github.com/ipfs/go-merkledag#93 pull request
- github.com/ipfs/go-merkledag/releases/tag/v0.8.0 release
- github.com/ipfs/go-merkledag/releases/tag/v0.8.1 release
- github.com/ipfs/go-merkledag/issues/90 advisory
- github.com/ipfs/kubo/issues/9297 advisory
Is CVE-2022-23495 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
1.38% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/ipfs/go-merkledag | >=0.4.0, <0.8.1 |
0.8.1 |
Affected products
- ipfs go-merkledag
Classification
References
-
github.com
/ipfs/go-merkledag/pull/91
web, patch, third-party-advisory
-
github.com
/ipfs/go-merkledag/pull/92
web, patch, third-party-advisory
-
github.com
/ipfs/go-merkledag/pull/93
web, patch, third-party-advisory
-
github.com
/ipfs/go-merkledag/issues/90
web, patch, third-party-advisory, report
-
github.com
/ipfs/kubo/issues/9297
web, patch, third-party-advisory, report
-
github.com
/ipfs/go-merkledag/security/advisories/GHSA-x39j-h85h-3f46
web, third-party-advisory, advisory
-
en.wikipedia.org
/wiki/Directed_acyclic_graph
web, technical-description, third-party-advisory
-
github.com
/ipfs/go-merkledag/releases/tag/v0.8.0
web, release-notes, third-party-advisory
-
github.com
/ipfs/go-merkledag/releases/tag/v0.8.1
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23495
advisory
-
github.com
/ipfs/go-merkledag
package
-
pkg.go.dev
/vuln/GO-2022-1155
web
Sources
- CVE List CVE-2022-23495
- GitHub Advisory GHSA-x39j-h85h-3f46
- NVD CVE-2022-23495
- OSV GO-2022-1155
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.