ProtoNode may be modified such that common method calls may panic in ipfs/go-merkledag
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ipfs | go-merkledag | 0.4.0 to before 0.8.1 | 0.8.1 | Patch available | CNA |
| — | github.com/ipfs/go-merkledag (Go) | 0.4.0 to before 0.8.1 | 0.8.1 | Patch available | GHSA-x39j-h85h-3f46 |
- go-merkledag Vendoripfs Affected 0.4.0 to before 0.8.1 Fixed in 0.8.1 Patch available CNA
- github.com/ipfs/go-merkledag (Go) Vendor— Affected 0.4.0 to before 0.8.1 Fixed in 0.8.1 Patch available GHSA-x39j-h85h-3f46
Remediation
- Fix · CNA go-merkledag (ipfs) Fixed in 0.8.1
- Fix · GHSA-x39j-h85h-3f46 github.com/ipfs/go-merkledag (Go) Fixed in 0.8.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-23495
- 2026-10-03 Alias added: GHSA-x39j-h85h-3f46
References
Patch 5
Advisory 5
More ipfs vulnerabilities
- TI-2023-09455 Denial of service when feeding malformed size arguments in go-bitfield CVSS 3.1HIGH 7.5
- TI-2023-10871 Boxo bitswap/server: DOS unbounded persistent memory leak CVSS 3.1HIGH 8.2
- TI-2020-08933 Exposure of Sensitive Information to an Unauthorized Actor in AEgir CVSS 3.1CRITICAL 9.6
- TI-2020-16104 Control character injection in console output CVSS 3.1HIGH 8.8
- TI-2020-16100 Path traversal in ipfs go-ipfs CVSS 3.1HIGH 8.1
- TI-2016-08604 Cryptographic flaw in HackerOne go-ipfs-dep node module CVSS 3.0HIGH 8.1
Sources
- CVE-2022-23495 · CVE Program
- CVE-2022-23495 · NVD
- FIRST EPSS
- GHSA-x39j-h85h-3f46 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences