Skip to content

Privilege Escalation via Role Misconfiguration

SAFE-0010 Access Control Checked automatically by the scanner
1

What goes wrong

Role assignment or admin-role wiring lets a lower-privilege account grant itself or others a higher role, or the DEFAULT_ADMIN_ROLE manages a role it should not, enabling escalation.

2

How to fix it

the pattern that is safe
function grantMinter(address a) external onlyRole(DEFAULT_ADMIN_ROLE) {
    _grantRole(MINTER_ROLE, a);
}
Use AccessControl with carefully set role admins.
Check your own contract for this

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