Skip to content

renounceOwnership Can Brick Privileged Functions

SAFE-0224 Access Control Checked automatically by the scanner
1

What goes wrong

The contract inherits renounceOwnership() while critical operations (pause, upgrade, fee, oracle updates) are onlyOwner. Renouncing sets owner to zero and permanently disables those operations — no one can ever respond to an incident.

2

The vulnerable pattern

proof of concept — how it is exploited
// owner calls renounceOwnership() (by mistake or after 'decentralising')
// pause()/setOracle() are now unreachable forever -> the protocol cannot
// be defended during the next exploit.
3

How to fix it

the pattern that is safe
// disable renounce, or move critical ops behind a non-renounceable role
function renounceOwnership() public override onlyOwner { revert("disabled"); }
Don't leave renounceOwnership enabled with live admin powers.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0224 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs