Skip to content

fix(eip7702): onlySelf guard on BatchExecutor.multiSend - #56

Merged
nekomoto911 merged 1 commit into
mainfrom
fix/eip7702-batchexecutor-only-self
Aug 18, 2026
Merged

fix(eip7702): onlySelf guard on BatchExecutor.multiSend#56
nekomoto911 merged 1 commit into
mainfrom
fix/eip7702-batchexecutor-only-self

Conversation

@nekomoto911

Copy link
Copy Markdown
Contributor

Summary

  • BatchExecutor.multiSend had no caller restriction. Under EIP-7702, any third party could call a delegated EOA and drain its ETH via address(this).call{value:}.
  • Add require(msg.sender == address(this), "only self") and refresh the embedded creation bytecode (solc 0.8.21 --optimize --optimize-runs 200).

Context

Found while reviewing Gravity public testnet 7702 bench residual state: worker EOAs still delegated to the vulnerable template after the bench process stopped, leaving balances drainable. Testnet workers were cleared/swept separately; this PR hardens the contract for future deploys.

Self-sponsored bench txs (tx.to == EOA, msg.sender == EOA) continue to work.

Test plan

  • Recompiled with solc --bin --optimize --optimize-runs 200; embedded hex matches artifact
  • Bytecode contains CALLER ADDRESS EQ (333014) before multiSend body
  • CI green
  • Optional: local/devnet smoke — self-call multiSend succeeds; third-party call reverts "only self"

Without msg.sender == address(this), any third party can call a
delegated EOA's multiSend and drain its ETH. Guard multiSend and
refresh the embedded creation bytecode (solc 0.8.21, optimize 200).
@nekomoto911
nekomoto911 merged commit 2063f36 into main Aug 18, 2026
2 checks passed
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.

2 participants