Skip to content

security: block meta-transaction self-call privilege escalation (resolver hijack)#1

Open
KyngKai909 wants to merge 5 commits into
developfrom
security/metatx-proxy-admin-guard
Open

security: block meta-transaction self-call privilege escalation (resolver hijack)#1
KyngKai909 wants to merge 5 commits into
developfrom
security/metatx-proxy-admin-guard

Conversation

@KyngKai909

Copy link
Copy Markdown
Member

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.

executeMetaTransaction dispatches its payload via address(this).call(...), so the inner call runs with msg.sender == address(this). DSAuth authorizes any caller where msg.sender == address(this) — so anyone could meta-relay privileged functions that authorize on raw msg.sender.

Fixes

  • F-1 (Critical, exploited): BasicMetaTransaction — forbid meta-relaying the EtherRouter/DSAuth proxy-admin selectors setResolver / setOwner / setAuthority (the resolver-hijack → drain vector). Covers colony, network, and extension proxies.
  • F-2 (Critical, found in this review): CommonStorage — override auth to authorize via meta-aware msgSender() and drop the address(this) self-trust, closing the same hole on ColonyNetwork's admin functions (setTokenLocking, initialise, addColonyVersion, …). Colonies were already safe via ColonyStorage.

Not affected (verified)

Colony logic (ColonyStorage override), all extensions (authorize via colony roles through msgSender()), and MetaTxToken/DSAuthMeta (its auth already uses msgSender()).

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, and ColonyNetwork.setTokenLocking reverts (ds-auth-unauthorized).

Reviewer notes / verification gate

Full write-up: audits/2026-06-16-metatx-selfcall-remediation.md.

  • Watch the CommonStorage.auth override in the DSAuth → CommonStorage → ColonyStorage chain; if solc requires it, change ColonyStorage's modifier auth() override to override(CommonStorage).
  • Part 2 changes authorization on the network's critical path — run the network initialise/upgrade/cross-chain suites, not just the new test.
  • Recommend a Base Sepolia exploit-replay and an independent audit before mainnet.

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

KyngKai909 and others added 4 commits June 16, 2026 14:00
… 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>
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.

1 participant