TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

Vulnerability in Immediate DAO Executor Assignment Risks Contract Integrity

Summary

The setDaoExecutor function in your Solidity contract allows for the setting of a DAO executor address, which is a critical role responsible for important contract functions. However, the function currently sets the new DAO executor immediately without any intermediate checks or confirmations, potentially allowing a compromised or incorrect address to assume the DAO executor role unexpectedly.

Vulnerability Details

The vulnerability stems from the following aspects of the setDaoExecutor function:

  1. Single-Step Ownership Transfer: The function directly assigns _daoExecutor as the new DAO executor without any additional confirmation steps or checks beyond the initial validation (_daoExecutor != address(0)). This immediate assignment can lead to unintended consequences if the address is incorrect or compromised.

  2. Role Significance: The DAO executor role holds significant authority over critical contract operations, such as configuring auctions or recovering tokens. Granting this role incorrectly or to an unauthorized address can compromise contract security and operational integrity.

https://github.com/Cyfrin/2024-07-templegold/blob/57a3e597e9199f9e9e0c26aab2123332eb19cc28/protocol/contracts/templegold/SpiceAuction.sol#L73

function setDaoExecutor(address _daoExecutor) external onlyDAOExecutor {
if (_daoExecutor == address(0)) { revert CommonEventsAndErrors.InvalidAddress(); }
daoExecutor = _daoExecutor;
emit DaoExecutorSet(_daoExecutor);
}

Impact

The impact of this vulnerability could be severe:

  • Unauthorized Access: Assigning DAO executorship to an incorrect or compromised address could grant unauthorized access to critical contract functions, potentially leading to misuse or manipulation of contract state and assets.

Tools Used

Manual review

Recommendations

To mitigate this issue, consider the following recommendations:

  1. Two-Step Ownership Transfer: Implement a two-step process for transferring DAO executorship. This could involve initial proposal or nomination followed by confirmation or multi-signature approval by existing DAO executors or governance participants.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.