In this track: Advanced security reasoning
advanced · 4 MIN READ

Upgrade authorization failures

An upgrade path can bypass otherwise correct application permissions.

LET’S PICTURE IT

A locked service desk is irrelevant if anyone can replace the entire office manual.

SEE IT FOR YOURSELF
Pack small values into Solidity storage slotsStep 1 / 4
Pack small values into Solidity storage slotsFirstuint128 A16 bytesSeconduint128 B16 bytesThirduint256 C32 bytesSimple elementary types only; not a complete compiler layoutSlot 0 · 32 bytesUnused · 16 BA · 16 BHigh-order bytes ← → low-order bytesSlot 0 · fullB · 16 BA · 16 BDeclaration order and sizes determine this packingSlot 0BASlot 1C · 32 bytesTry different sequences in the storage-layout tool

In this simple default-layout example, two uint128 values come before one uint256. Each slot holds thirty-two bytes.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Locate the final target write

Trace every route that can change the implementation or execution target. The security question is who can cause that effect, not just which function has an admin-like name.

Check the current context

An authorization check must run in the intended proxy or implementation context. Confusing direct and delegated execution can produce incorrect authority assumptions.

Preserve policy through upgrades

A new implementation can change the future upgrade gate. Review the resulting authority model, not only the current upgrade transaction’s permission.

Test adversarial transitions

Try unauthorized upgrades, role changes and incompatible targets locally. Assert that rejected attempts preserve both target and application state.

Work through the boundary

upgrade request
→ intended caller check
→ target compatibility checks
→ implementation change
→ verify resulting future authority

A simplified local review scenario. The example establishes a question to test, not a guarantee of production safety.

QUICK CHECK · NO PRESSURE

Can a new implementation change future upgrade behavior?

Your progress stays in this browser.
Keep exploring the original referenceSolidity documentation ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.