MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

[M] Single-Action Ownership Transfer Vulnerability

Summary

Within the Composable Finance ecosystem's contract architecture, the capability for
an owner to modify contract ownership is facilitated via a direct invocation of the transferOwnership function.
This function subsequently triggers the _transferOwnership function to instantaneously appoint a new owner.
The process's singular-step nature introduces a margin for human error, potentially culminating in irreversible
consequences.

Vulnerability Details

function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
OwnableStorage storage ownableStorage = _getOwnableStorage();
address oldOwner = ownableStorage._owner;
ownableStorage._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}

Impact

Imagine a scenario where Bob, a developer at the protocol, attempts to utilize transferOwnership() for
altering the owner of a contract but mistakenly inputs an incorrect address. This mishap could lead to a
scenario where Bob irrevocably loses access to the contract's administrative functions.

Tools Used

manual review

Recommendations

Introduce a biphasic ownership transition protocol. Initially, the current owner
should nominate a successor, followed by the nominee's confirmation through an explicit acceptance action.
This procedure ensures an additional verification layer, thereby mitigating the risk of unintended ownership
transitions.

Establish a comprehensive catalog of actions accessible to privileged roles within the
ecosystem. Documenting such functionalities alongside their inherent risks aids in the systematic examination
of the codebase, ensuring that preventive measures are in place to avert similar pitfalls in the future.

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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