The initialize() function in ConfidencePoolFactory.sol uses the OpenZeppelin initializer modifier, which only ensures the function is called once, but does not restrict who calls it. If the factory proxy is deployed via a separate transaction from its initialization, it remains in an uninitialized state on-chain for a brief window. An attacker monitoring the mempool can front-run the legitimate initialization transaction and call initialize() themselves, setting themselves as the owner.
Root Cause: Lack of caller authorization (onlyOwner or onlyFactory) in initialize(). The initializer modifier is insufficient for access control.
PoC Full Video:
I'm upload google drive full PoC video for better understand https://drive.google.com/file/d/1-KYsCQSbHK3eS0SDDw9EJfGnlzLMHb9w/view?usp=drivesdk
Likelihood:
· This issue depends on the deployment script pattern. If ERC1967Proxy deployment and initialize() call are two separate transactions, the vulnerability is guaranteed to be exploitable by any mempool watcher.
· The proxy address is known immediately after deployment, giving attackers a clear target.
· Since many upgradeable contracts are deployed this way, the likelihood is High in misconfigured deployments.
PoC Full Video:
I'm upload google drive full PoC video for better understand https://drive.google.com/file/d/1-KYsCQSbHK3eS0SDDw9EJfGnlzLMHb9w/view?usp=drivesdk
Impact:
· An attacker gains full ownership of the factory contract.
· The attacker can call setPoolImplementation() to deploy malicious pools, leading to theft of all funds deposited into future pools.
· The attacker can pause() the entire factory, causing Denial of Service (DoS).
· The attacker can use _authorizeUpgrade() (since it is onlyOwner) to upgrade the factory to any arbitrary logic, permanently compromising the protocol.
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.
The contest is complete and the rewards are being distributed.