Skip to content
critical Upgradeability No SWC entry CWE-284

UUPS Upgrade Authorization Bug

SAFE-0035 Upgradeability Checked automatically by the scanner
1

What goes wrong

A UUPS contract fails to restrict _authorizeUpgrade, letting anyone upgrade the implementation to malicious code, or leaves the implementation initializable and self-destructible.

2

How to fix it

the pattern that is safe
function _authorizeUpgrade(address) internal override onlyOwner {}
OZ UUPS guidance; always gate _authorizeUpgrade.
Check your own contract for this

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