Platform: Code4rena
Start Date: 07/07/2022
Pot Size: $75,000 USDC
Total HM: 32
Participants: 141
Period: 7 days
Judge: HardlyDifficult
Total Solo HM: 4
Id: 144
League: ETH
Rank: 43/141
Findings: 1
Award: $267.71
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xA5DF
Also found by: 0x, 0xsanson, 242, Critical, sorrynotsorry, unforgiven, zzzitron
267.7106 USDC - $267.71
https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/VaultFactory.sol#L20-L22 https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/Vault.sol#L24-L29 https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/Vault.sol#L49-L68
A mixture of Failing to initialize the implementation contract after it is deployed in the constructor of the factory contract, and allowing for the owner to delegateCall other contracts in the Vault.sol contract itself.
This will result in a permanent loss of funds.
Steps to exploit:
init()
is called on the implementation vault
contract. This will give an arbitrary address ownership over the implementation contract.execute
function on the Vault.sol contract and delegate call to a different contract I choose. Lets assume I want to delegateCall to a malicious contract that employs the selfdestruct()
method.POC repo will be provided upon request.
Initialize the implementation contract in the constructor of the factory contract. That will solve this issue.
#0 - ecmendenhall
2022-07-15T03:15:44Z