Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: limit fromRlp decode depth#4772

Merged
jxom merged 1 commit into
mainfrom
jxom/fix-rlp-depth-limit
Jun 29, 2026
Merged

fix: limit fromRlp decode depth#4772
jxom merged 1 commit into
mainfrom
jxom/fix-rlp-depth-limit

Conversation

@jxom

@jxom jxom commented Jun 29, 2026

Copy link
Copy Markdown
Member

Limits fromRlp decoding to 1,024 nested RLP lists and returns a typed RlpDepthLimitExceededError rather than recursing until the runtime stack overflows.

Deeply nested untrusted RLP can otherwise crash processes that decode arbitrary payloads. Fixes #4770 and adds coverage for a valid deeply nested payload.

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93c1ee6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
viem Building Building Preview, Comment Jun 29, 2026 10:27pm

Request Review

@jxom jxom marked this pull request as ready for review June 29, 2026 22:29
@jxom jxom merged commit b0a0e1c into main Jun 29, 2026
32 of 33 checks passed
@jxom jxom deleted the jxom/fix-rlp-depth-limit branch June 29, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security] RLP decoder uses Infinity recursiveReadLimit → stack overflow with deeply nested payload

1 participant