Skip to content

chore(deps): update module github.com/ipld/go-ipld-prime to v0.23.0 [security] - #10

Closed
dwertent wants to merge 1 commit into
release-v0.28.4from
renovate/go-github.com-ipld-go-ipld-prime-vulnerability
Closed

chore(deps): update module github.com/ipld/go-ipld-prime to v0.23.0 [security]#10
dwertent wants to merge 1 commit into
release-v0.28.4from
renovate/go-github.com-ipld-go-ipld-prime-vulnerability

Conversation

@dwertent

Copy link
Copy Markdown

This PR contains the following updates:

Package Type Update Change
github.com/ipld/go-ipld-prime indirect minor v0.21.0v0.23.0

go-ipld-prime: DAG-CBOR decoder unbounded memory allocation from CBOR headers

CVE-2026-35480 / GHSA-378j-3jfj-8r9f

More information

Details

The DAG-CBOR decoder uses collection sizes declared in CBOR headers as Go preallocation hints for maps and lists. The decoder does not cap these size hints or account for their cost in its allocation budget, allowing small payloads to cause excessive memory allocation.

A CBOR map or list header can declare an arbitrarily large number of entries, causing the decoder to preallocate proportionally large backing structures before any entries are actually read. Because the allocation budget is only decremented as entries are decoded (not when sizes are declared), this cost is effectively invisible to the budget system. This is compounded by nesting: each level of a nested structure triggers its own unchecked preallocation while consuming minimal budget (one entry per parent level), so a payload under 100 bytes with 10 levels of nesting can cause over 9GB of allocation.

Schema-free decoding (i.e. using basicnode.Prototype.Any) allows arbitrary nesting depth. Schema-bound decoding limits nesting to the schema's structure, but any field typed as Any in the schema permits unconstrained nesting within that field.

The fix caps the preallocation size hint to 1024 entries and decrements the allocation budget when collection sizes are declared. The declared length is still used for entry-count validation, and collections grow dynamically as entries are decoded, so correctly-formed data is unaffected, even beyond the preallocation limit.

Severity

  • CVSS Score: 6.2 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


go-ipld-prime's DAG-CBOR and DAG-JSON decoders have unbounded recursion depth

CVE-2026-42328 / GHSA-w239-58x2-q8p5

More information

Details

The DAG-CBOR and DAG-JSON decoders recurse on each nested map or list without a depth limit. A payload containing deeply nested collections causes the decoder to recurse once per level, growing the goroutine stack until the Go runtime terminates the process with a fatal stack overflow (distinct from a recoverable panic).

For DAG-CBOR, a payload of approximately 2 MB, consisting of repeated 0x81 (array-of-1) bytes followed by a terminator, produces around 2 million recursion frames and reliably exhausts Go's default 1 GB goroutine stack. The existing allocation budget does not prevent this: each nested collection header costs only a handful of budget units, so the stack is exhausted before the budget is. DAG-JSON has equivalent exposure via [[[...]]]-style payloads; it has no budget system and is therefore unprotected against recursion depth as well.

Schema-free decoding (using basicnode.Prototype.Any) allows arbitrary nesting depth. Schema-bound decoding bounds nesting only when the schema itself is non-recursive and contains no fields typed as Any; schemas with recursive type references or any Any-typed fields permit unconstrained nesting at those points.

The fix adds a configurable MaxDepth option to both decoders, defaulting to 1024 nested levels. The decoder returns ErrDecodeDepthExceeded when a payload nests beyond the limit. Well-formed IPLD data rarely approaches this depth in practice; the default is generous for legitimate use while preventing stack exhaustion.

Severity

  • CVSS Score: 6.2 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

ipld/go-ipld-prime (github.com/ipld/go-ipld-prime)

v0.23.0

Compare Source

What's Changed
  • build(deps): bump github.com/ipfs/go-datastore from 0.9.0 to 0.9.1 in /storage/dsadapter by @​dependabot[bot] in #​614
  • ci: uci/update-go by @​web3-bot in #​616
  • chore(docs): s/AllowBudget/AllocationBudget by @​rvagg in #​617
  • build(deps): bump github.com/ipfs/boxo from 0.35.0 to 0.38.0 in /storage/bsrvadapter by @​dependabot[bot] in #​623
  • build(deps): bump github.com/ipfs/go-cid from 0.6.0 to 0.6.1 in /storage/bsadapter by @​dependabot[bot] in #​624
  • build(deps): bump github.com/ipld/go-ipld-prime from 0.21.0 to 0.22.0 in /storage/bsadapter by @​dependabot[bot] in #​618
  • build(deps): bump github.com/ipfs/go-cid from 0.6.0 to 0.6.1 in /storage/bsrvadapter by @​dependabot[bot] in #​621
  • build(deps): bump github.com/ipfs/boxo from 0.35.0 to 0.38.0 in /storage/bsadapter by @​dependabot[bot] in #​622
  • build(deps): bump github.com/ipfs/go-cid from 0.6.0 to 0.6.1 by @​dependabot[bot] in #​620
  • feat(codec): MaxDepth on DecodeOptions & more bounds testing by @​rvagg in #​625

Full Changelog: ipld/go-ipld-prime@v0.22.0...v0.23.0

v0.22.0

Compare Source

What's Changed
New Contributors

Full Changelog: ipld/go-ipld-prime@v0.21.0...v0.22.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

Copilot AI review requested due to automatic review settings June 15, 2026 20:33
@dwertent

Copy link
Copy Markdown
Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 13 additional dependencies were updated

Details:

Package Change
github.com/ipfs/go-cid v0.5.0 -> v0.6.1
golang.org/x/crypto v0.49.0 -> v0.50.0
golang.org/x/text v0.35.0 -> v0.36.0
github.com/mr-tron/base58 v1.2.0 -> v1.3.0
github.com/multiformats/go-multibase v0.2.0 -> v0.3.0
github.com/multiformats/go-multicodec v0.9.2 -> v0.10.0
github.com/multiformats/go-varint v0.0.7 -> v0.1.0
github.com/polydawn/refmt v0.89.0 -> v0.89.1-0.20231129105047-37766d95467a
golang.org/x/mod v0.33.0 -> v0.34.0
golang.org/x/sys v0.42.0 -> v0.43.0
golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 -> v0.0.0-20260311193753-579e4da9a98c
golang.org/x/term v0.41.0 -> v0.42.0
golang.org/x/tools v0.42.0 -> v0.43.0
File name: nodebuilder/tests/tastora/go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 13 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.25.9 -> 1.25.11
github.com/ipfs/go-cid v0.5.0 -> v0.6.1
github.com/mr-tron/base58 v1.2.0 -> v1.3.0
github.com/multiformats/go-multibase v0.2.0 -> v0.3.0
github.com/multiformats/go-multicodec v0.9.2 -> v0.10.0
github.com/multiformats/go-varint v0.0.7 -> v0.1.0
github.com/polydawn/refmt v0.89.0 -> v0.89.1-0.20231129105047-37766d95467a
golang.org/x/crypto v0.49.0 -> v0.50.0
golang.org/x/mod v0.33.0 -> v0.34.0
golang.org/x/sys v0.42.0 -> v0.43.0
golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 -> v0.0.0-20260311193753-579e4da9a98c
golang.org/x/term v0.41.0 -> v0.42.0
golang.org/x/text v0.35.0 -> v0.36.0
golang.org/x/tools v0.42.0 -> v0.43.0

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Celestia Node Go module dependencies to remediate security advisories by bumping github.com/ipld/go-ipld-prime to v0.23.0 (and aligning related transitive dependencies across the root module and the tastora test submodule).

Changes:

  • Bump github.com/ipld/go-ipld-prime from v0.21.0v0.23.0 (indirect) in both the root module and nodebuilder/tests/tastora.
  • Update several related/transitive dependencies (e.g. github.com/ipfs/go-cid, github.com/multiformats/*, golang.org/x/*) as a result of the module update/tidy.
  • Update the nodebuilder/tests/tastora module’s Go version directive.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
go.mod Bumps go-ipld-prime and other transitive deps in the root module.
nodebuilder/tests/tastora/go.mod Mirrors dependency bumps for the tastora submodule and adjusts its go directive.
nodebuilder/tests/tastora/go.sum Updates dependency checksums consistent with the submodule’s dependency resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

module github.com/celestiaorg/celestia-node/nodebuilder/tests/tastora

go 1.25.9
go 1.25.11
Comment thread go.mod
github.com/ipfs/boxo v0.33.1
github.com/ipfs/go-block-format v0.2.2
github.com/ipfs/go-cid v0.5.0
github.com/ipfs/go-cid v0.6.1
@dwertent

Copy link
Copy Markdown
Author

Closing: opened during a CVE-remediation test session on 2026-06-15; not needed (superseded by consolidated grouped/direct-only/severity-filtered config). Sorry for the noise.

@dwertent dwertent closed this Jun 15, 2026
@dwertent
dwertent deleted the renovate/go-github.com-ipld-go-ipld-prime-vulnerability branch June 18, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants