Skip to content
Access control Audit finding Beginner

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.

WatchPug Follow

Originally disclosed on Code4rena

Submitted by WatchPug, also found by JMukesh, peritoflores, and whilom

Pausable.sol#L65-L68

    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 pauser of 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, changePauser needs to have an onlyOwner modifier instead of onlyPauser.

HP-25: C4 Audit Fixes, Dynamic Fee Changes bcnmy/hyphen-contract#42

pauliax (judge) commented:

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.


The original report as published on Code4rena, by WatchPug. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

  1. The pauser calls pause().
  2. The pauser calls renouncePauser().
  3. 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.

More by WatchPug

View all

197 more disclosed reports, best first.

More from Biconomy - Smart Contract Wallet contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.