Skip to content

Function Selector Clash (Proxy vs Implementation)

SAFE-0231 Upgradeability Checked automatically by the scanner
1

What goes wrong

A transparent proxy exposes admin functions whose 4-byte selectors can collide with implementation functions. A crafted call can be routed to the wrong target, invoking admin logic from a user path (or vice-versa).

2

The vulnerable pattern

proof of concept — how it is exploited
// proxy has admin fn with selector 0x4f1ef286; implementation has a
// public fn colliding on the same selector. Depending on caller,
// the call hits the unintended function.
3

How to fix it

the pattern that is safe
// use OpenZeppelin TransparentUpgradeableProxy (admin routed separately),
// or UUPS where upgrade logic lives in the implementation.
Known proxy selector-clash class; use audited proxy patterns.
Check your own contract for this

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