WardenPledge accidentally inherits Ownable instead of Owner which removes an important safeguard without sponsor knowledge
WardenPledge inherits from Ownable instead of the intended Owner contract, so the two-step ownership transfer safeguard is missing. The owner could accidentally transfer ownership to an inoperable address, losing control of the contract.
Submitted by 0x52, also found by pashov and indijanc
Owner may accidentally transfer ownership to inoperable address due to perceived safeguard that doesn’t exist.
Proof of Concept
contract WardenPledge is Ownable, Pausable, ReentrancyGuard {
WardenPledge inherits from Ownable rather than Owner, which is the intended contract. Owner overwrites the critical Ownable#transferOwnership function to make the ownership transfer process a two step process. This adds important safeguards because in the event that the target is unable to accept for any reason (input typo, incompatible multisig/contract, etc.) the ownership transfer process will fail because the pending owner will not be able to accept the transfer. To make matters worse, since it only overwrites the transferOwnership function the WardenPledge contract will otherwise function as intended just without this safeguard. It is likely that the owner won’t even realize until it’s too late and the safeguard has failed. A perceived safeguard where there isn’t one is more damaging than not having any safeguard at all.
Recommended Mitigation Steps
- contract WardenPledge is Ownable, Pausable, ReentrancyGuard {
+ contract WardenPledge is Owner, Pausable, ReentrancyGuard {
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
The owner could accidentally transfer ownership to an address that cannot accept it, permanently losing control of the contract, and the mistake may go unnoticed until it is too late.
What the attacker needed
Owner initiates ownership transfer; target address cannot accept ownership
The fix
The contract should inherit from Owner instead of Ownable to restore the two-step ownership transfer safeguard.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Smart contracts often have an owner who can perform special actions. To avoid losing control by mistake, the project intended to use a safer ownership contract that requires the new owner to accept the transfer. But the contract used the wrong base contract, so the safety step was missing and ownership could be sent to an address that cannot accept it.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.