Open hats-bug-reporter[bot] opened 4 months ago
Seems the same as #92, but with a different actor. These are both issues regarding the independent admin, which should be a trusted entity. He does not abuse functionality he was not granted to begin with. It's like the owner losing his private key imo, will wait for another comment
Just like previous issue, the issue is invalid, using InverterTransparentUpgradeableProxy_v1
allows the admin to catch the last implementation address which means that before each update, admin could take some time to decide to update to the updated address or not. (not anything more than that)
https://github.com/hats-finance/Inverter-Network-0xe47e52c4fea05e555920f1dcdcc6fb8eca103eeb/blob/62892384fd7d0ce4d0e389c530200c69921473f7/src/proxies/InverterTransparentUpgradeableProxy_v1.sol#L116
Github username: @0xfuje Twitter username: 0xfuje Submission hash (on-chain): 0xb4a0f507f7ca5648340d1f406ff3b0ee42c8bcc4ef73000e8121b758c5263120 Severity: high
Description:
Impact
Total loss of user funds in any module contracts that currently hold funds or users used to approve funds to. Since anyone can be a module owner that exploits this and the initial module seems safe it's high severity. Non-malicious updates can also break functionality.
Description
Anyone can create a module and be it's owner via
createModule()
by settingworkflowConfig.independentUpdates
to be true. It's initialized as aInverterTransparentUpgradeableProxy_v1
and the module owner has full control of updating the proxy.ModuleFactory_v1
-createModule()
Proof of Concept
LM_PC_Staking_v1
contract is initialized withcreateModule()
as anInverterTransparentUpgradeableProxy_v1
, meaning the module creator is the independent update adminOrchestrator_v1
stake()
their fundsNote that the orchestrator owner could also exploit this as he can be the module owner, but this is an independent external actor in this case.
Recommendation
While this functionality for module proxies to have independent admins would add decentralization to the system, it is quite dangerous as it's easily exploitable. Consider to completely disallow
independentUpdates
of modules.