security: block meta-transaction self-call privilege escalation (resolver hijack)#1
Open
KyngKai909 wants to merge 5 commits into
Open
security: block meta-transaction self-call privilege escalation (resolver hijack)#1KyngKai909 wants to merge 5 commits into
KyngKai909 wants to merge 5 commits into
Conversation
…lver hijack) Fixes the meta-transaction self-call vector exploited against ShapeShift FOX Colony (Arbitrum, 2026-05-13, ~$182K). - BasicMetaTransaction: forbid meta-relaying the EtherRouter/DSAuth proxy-admin selectors (setResolver/setOwner/setAuthority). - CommonStorage: override `auth` to authorize via msgSender() and drop DSAuth's address(this) self-trust, closing the same class on ColonyNetwork's admin functions. - Add regression test (test/contracts-network/metatx-admin-selfcall-guard.js) and a security review document (audits/). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… test Upstream CI is CircleCI tied to private DockerHub creds; this runs on GitHub-hosted runners so it works on the fork with no external setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…c 0.8) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…min case Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remediates the meta-transaction self-call privilege escalation exploited against ShapeShift's FOX Colony (Arbitrum, 2026-05-13, ~$182K), plus a second instance of the same class found during review.
executeMetaTransactiondispatches its payload viaaddress(this).call(...), so the inner call runs withmsg.sender == address(this). DSAuth authorizes any caller wheremsg.sender == address(this)— so anyone could meta-relay privileged functions that authorize on rawmsg.sender.Fixes
BasicMetaTransaction— forbid meta-relaying the EtherRouter/DSAuth proxy-admin selectorssetResolver/setOwner/setAuthority(the resolver-hijack → drain vector). Covers colony, network, and extension proxies.CommonStorage— overrideauthto authorize via meta-awaremsgSender()and drop theaddress(this)self-trust, closing the same hole onColonyNetwork's admin functions (setTokenLocking,initialise,addColonyVersion, …). Colonies were already safe viaColonyStorage.Not affected (verified)
Colony logic (
ColonyStorageoverride), all extensions (authorize via colony roles throughmsgSender()), andMetaTxToken/DSAuthMeta(itsauthalready usesmsgSender()).Tests
test/contracts-network/metatx-admin-selfcall-guard.js— asserts the proxy-admin trio reverts (colony-metatx-admin-selector-forbidden) and the resolver is unchanged, a legitimate non-admin meta-tx still succeeds, andColonyNetwork.setTokenLockingreverts (ds-auth-unauthorized).Reviewer notes / verification gate
Full write-up:
audits/2026-06-16-metatx-selfcall-remediation.md.CommonStorage.authoverride in theDSAuth → CommonStorage → ColonyStoragechain; if solc requires it, changeColonyStorage'smodifier auth() overridetooverride(CommonStorage).initialise/upgrade/cross-chain suites, not just the new test.🤖 Generated with Claude Code