Skip to content

Missing Initializer Disable on Implementation

SAFE-0009 Access Control Checked automatically by the scanner
1

What goes wrong

The logic/implementation contract behind a proxy never calls _disableInitializers in its constructor, so the implementation itself can be initialized directly and, via selfdestruct or delegatecall tricks, used to brick or hijack the proxy.

2

How to fix it

the pattern that is safe
contract Logic is UUPSUpgradeable {
    constructor() { _disableInitializers(); }
    function initialize() external initializer { __UUPS_init(); }
}
OZ UUPS guidance; prevents implementation takeover.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0009 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