The function setOwner in SmartVaultV3.sol has a modifier onlyVaultManager that allows only Vault manager to change the owner of the Vault. Even the owner of the vault can't change the owner.
This restriction can be bypassed, by using the inherent transferFrom function of SmartVaultManagerV5.sol to transfer the Vault NFT to some other target address.
After the transfer if we check the owner of the Vault, we will see that it is changed to the target address.
A hardhat test is shown below to confirm this vulnerability
Here is test to bypass the setOwner restriction for changing the owner of the Vault.
A user is able to bypass the restriction placed on vaults for changing the owner
Manual review
Override transferFrom and safetransferFrom functions of SmartVaultManagerV5.sol to protect anyone other than the vaultmanager from changing vault owner.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.