Lucene search

HistoryAug 07, 2022 - 12:00 a.m.

Inadequate transferOwnership function prevents new owner from accessing funds


Lines of code

Vulnerability details


There are two sources of truth for identifying the account that owns a given MIMOProxy:

  1. MIMOProxy.owner()
  2. MIMOProxyRegistry.getCurrentProxy(address)

The first source of truth is only used within the proxy contract itself, and the second source of truth is used to identify & authenticate the MIMOProxy associated with a given owner address.

MIMOProxy contains a function transferOwnership, which is intended to transfer control of the proxy to a new account. The transferOwnership function updates the MIMOProxy.owner() source of truth, but fails to update the MIMOProxyRegistry.getCurrentProxy source of truth.


The new owner of the proxy is unable to use the various “action” contract implementations to manage the proxy’s vaults.

This means the vault’s funds will be effectively locked. To recover the funds, the new owner will have to either transfer ownership back to the old address, or deploy a specially crafted action contract to recover the funds, then set up the contract using setPermission.

Fortunately, the old owner cannot access funds due to checks against the first source of truth in MIMOProxy.execute()

However, it should be noted that the old owner can set up a MIMOAutoAction after the proxy has been transferred to the new owner. MIMOAutoAction’s setAutomation function can be called from a non-proxy msg.sender, bypassing the first source of truth’s authorization check.

At this time, it does not appear that setting up MIMOAutoAction can cause a loss of funds for the vault.

Proof of Concept

High level PoC:

  1. User A creates a proxy via MIMOProxyRegistry.deploy()
  2. User A funds vault
  3. User A transfers ownership of the proxy to User B using MIMOProxy.transferOwnership


  • User B can no longer use any of the deployed action contracts to manage vault funds
  • User A can still manage the vault’s automation status using MIMOAutoAction.setAutomation

A coded PoC based on MIMOEmptyVault.test.ts can be found here: <;

Tools used

  • Hardhat

Recommended Mitigation

Changes to the proxy contract’s owner must be propagated to the proxy registry.

Since a proxy contract’s new owner may already have a proxy associated with their address, ownership transfers should revert if the new owner address is already associated with a different proxy.

The text was updated successfully, but these errors were encountered:

👍 1 horsefacts reacted with thumbs up emoji

All reactions

  • 👍 1 reaction