A pauser can brick the contracts
The contract's pauser role could call pause() and then renouncePauser(), leaving the contract permanently paused with no way to unpause. This would freeze all funds and make most contract methods unavailable.
Submitted by WatchPug, also found by JMukesh, peritoflores, and whilom
function renouncePauser() external virtual onlyPauser {
emit PauserChanged(_pauser, address(0));
_pauser = address(0);
}
A malicious or compromised pauser can call pause() and renouncePauser() to brick the contract and all the funds can be frozen.
Proof of Concept
Given:
- Alice (EOA) is the
pauserof the contract. - Alice calls
pause(); - Alice calls
renouncePauser();
As a result, most of the contract’s methods are now unavailable, and this cannot be reversed even by the owner.
Recommended Mitigation Steps
Consider removing renouncePauser(), or requiring the contract not in paused mode when renouncePauser().
ankurdubey521 (Biconomy) confirmed and commented:
Yeah,
changePauserneeds to have anonlyOwnermodifier instead ofonlyPauser.HP-25: C4 Audit Fixes, Dynamic Fee Changes bcnmy/hyphen-contract#42
A valid concern, however, the proposed solution has drawbacks too. If you change from onlyPauser to onlyOwner here, a compromise of the owner account will have devastating consequences while with the current implementation the pauser can still pause the contracts independently of an owner. So this is a double-edged sword, it is up to you to decide which way is more acceptable.
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
Root cause
The renouncePauser function allows the pauser to remove themselves while the contract is paused, with no check to prevent this state.
Impact
The contract could be permanently paused, freezing all funds and making most methods unavailable, with no recovery even by the owner.
What the attacker needed
Pauser role (malicious or compromised)
How it was found
- The pauser calls pause().
- The pauser calls renouncePauser().
- Most contract methods become unavailable and cannot be reversed.
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.
A contract has a special role called a pauser that can stop it from working. If that role is given up after pausing, nobody can restart the contract, so money gets stuck.
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.