The `TadleFactory` contract allows a guardian address to deploy upgradeable proxy contracts. If the guardian address is compromised, an attacker can deploy a proxy pointing to a malicious logic contract, gaining control over the system.
Initial State: guardian is set to an address controlled by the attacker.
Attack:
Attacker deploys a contract to call deployUpgradeableProxy with malicious logic.
Impact: The attacker deploys a proxy pointing to a malicious logic contract, gaining control over the system.
forge test --match-path test/ExploitSimulationTest.t.sol
[⠊] Compiling...
[⠑] Compiling 1 files with Solc 0.8.26
[⠘] Solc 0.8.26 finished in 1.56s
Compiler run successful!
Ran 1 test for test/ExploitSimulationTest.t.sol:ExploitSimulationTest
[PASS] testCompromisedGuardian() (gas: 720894)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 105.54ms (36.09ms CPU time)
Ran 1 test suite in 147.51ms (105.54ms CPU time): 1 tests passed, 0 failed, 0 skipped (1 total tests)
An attacker controlling the guardian address can deploy a proxy pointing to a malicious logic contract, gaining control over the system.
The attacker can perform unauthorized actions, such as transferring funds, modifying system configurations, or disrupting operations.
The integrity and security of the entire system are compromised, potentially leading to significant financial and reputational damage.
Manual review
Use a multisig wallet for the guardian address to distribute control and reduce the risk of a single point of failure.
Regularly rotate the guardian address and ensure it is controlled by trusted parties.
Implement additional access control mechanisms, such as role-based access control (RBAC), to limit the actions that the guardian can perform.
Introduce a time-lock mechanism for critical actions to provide a window for intervention in case of a compromised guardian.
The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and
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.