Fast Cerulean Armadillo
Medium
The executeSetterFunction in the MultiSign contract lacks access control, allowing any user to call this function. Since this function is used in critical administrative functions such as setting the admin address, withdrawal time limit, protocol LTV, and bond ratio, this vulnerability could disrupt contract functionality and governance.
The executeSetterFunction does not implement any access control mechanism, making it callable by any external user.
function executeSetterFunction(
SetterFunctions _function
) external returns (bool) {
// Get the number of approvals
require(getSetterFunctionApproval(_function) >= requiredApprovals,"Required approvals not met");
// Loop through the approved functions with owners mapping and change to false
for (uint64 i; i < noOfOwners; i++) {
approvedToUpdate[_function][owners[i]] = false;
}
return true;
}
Admin use this function to set important values for CDS and borrowing contract. If a user call executeSetterFunction when enough approve collected, it will simply return true and reset the approvals. This prevents admin to update intended values .
function setWithdrawTimeLimit(uint64 _timeLimit) external onlyAdmin {
// Check he timelimit is non zero
if (_timeLimit == 0) revert CDS_NeedsMoreThanZero();
// Check whether, the function have required approvals from owners to set
if (!multiSign.executeSetterFunction(IMultiSign.SetterFunctions(2))) revert CDS_RequiredApprovalsNotMetToSet();
withdrawTimeLimit = _timeLimit;
}
No response
No response
- A malicious user calls executeSetterFunction, bypassing intended governance processes.
- This resets approvals for critical functions, blocking authorized administrators from making essential updates.
- If approvals are reset repeatedly, administrative functions in linked contracts such as setAdmin, setWithdrawTimeLimit, setLTV, and setBondRatio could be permanently blocked.
Admin functions become unusable, potentially causing operational and financial losses
No response
Restrict executeSetterFunction to be callable only by whitelisted contracts