anyone can create a vault by directly calling the factory #80
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
jonah1005
Vulnerability details
Impact
MochiVaultFactory.sol#L26-L37
There's no permission control in the vaultFactory. Anyone can create a vault. The transaction would be reverted when the government tries to deploy such an asset.
As the protocol checks whether the vault is a valid vault by comparing the contract's address with the computed address, the protocol would recognize the random vault as a valid one.
I consider this is a medium-risk issue.
Proof of Concept
Here's a web3.py script to trigger the bug.
Tools Used
None
Recommended Mitigation Steps
Recommend to add a check.
The text was updated successfully, but these errors were encountered: