Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Anubis - Unilateral Admin Authority with Risk of Unauthorized Transaction Execution #23

Closed
sherlock-admin opened this issue Jan 25, 2024 · 0 comments
Labels
Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Jan 25, 2024

Anubis

high

Unilateral Admin Authority with Risk of Unauthorized Transaction Execution

Summary

The Timelock contract consolidates significant authority in the admin role, enabling the execution of crucial functions (queueTransaction, cancelTransaction, executeTransaction) without multi-party consensus. This design introduces a single point of failure and a potential vector for privilege escalation and unauthorized transaction execution.

Vulnerability Detail

The contract's current architecture grants the admin role exclusive control over sensitive functions, creating a centralization risk. An attacker compromising the admin's private key or the role being misused can lead to unauthorized state alterations within the system. Potential exploits include enqueuing and executing transactions that could divert funds, manipulate governance decisions, or compromise the integrity of the governed protocols.

Impact

Compromise of the admin role poses severe threats, including but not limited to:

  • Unauthorized system configuration changes.
  • Execution of malicious transactions leading to fund drainage.
  • Seizure of control over governed protocols.
  • Erosion of trust and security within the governed ecosystem.
  • These risks collectively represent a substantial threat to the system's integrity, security, and user trust.

Code Snippet

https://github.com/sherlock-audit/2024-01-olympus-on-chain-governance/blob/main/bophades/src/external/governance/Timelock.sol#L108
https://github.com/sherlock-audit/2024-01-olympus-on-chain-governance/blob/main/bophades/src/external/governance/Timelock.sol#L125
https://github.com/sherlock-audit/2024-01-olympus-on-chain-governance/blob/main/bophades/src/external/governance/Timelock.sol#L140

Tool used

Manual Review

Recommendation

Mitigate the centralization risk by implementing a multi-signature or a decentralized governance model for pivotal actions. Introduce mechanisms such as timelocks or multi-step confirmations to ensure that no single party can unilaterally enact significant changes.

Code Snippet for Fix:

// Enforce multi-signature or collective approval for critical functions
modifier multiSigRequired() {
    require(isConfirmedAction(msg.sender, txHash), "MultiSigRequired: Awaiting more confirmations");
    _;
    // Reset for next operation
    resetActionConfirmation(txHash);
}

function queueTransaction(...) public multiSigRequired returns (bytes32) {
    ...
}

function cancelTransaction(...) public multiSigRequired {
    ...
}

function executeTransaction(...) public payable multiSigRequired returns (bytes memory) {
    ...
}

// Functions for managing multi-signature confirmations
function isConfirmedAction(address action, bytes32 txHash) internal view returns (bool);
function resetActionConfirmation(bytes32 txHash) internal;

By requiring multiple confirmations from distinct governance participants, the system can ensure that no single entity has unilateral control over critical actions, thereby preventing unauthorized transactions and enhancing the overall security of the system.

Duplicate of #22

@github-actions github-actions bot added the Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label label Jan 27, 2024
@sherlock-admin sherlock-admin changed the title Helpful Denim Salmon - Unilateral Admin Authority with Risk of Unauthorized Transaction Execution Anubis - Unilateral Admin Authority with Risk of Unauthorized Transaction Execution Jan 30, 2024
@sherlock-admin sherlock-admin added Non-Reward This issue will not receive a payout and removed Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

1 participant