← Academy library

Crypto / Evergreen

A missing permission check can expose a privileged function

Access-control failures occur when a sensitive operation can be reached by callers who should not have that authority under the intended design.

THE IDEA TO KEEP

Permissions must be enforced where execution occurs; hiding an action in the interface does not make the contract reject it.

The distinction that matters

Access-control failures occur when a sensitive operation can be reached by callers who should not have that authority under the intended design. Smart-contract security combines software correctness, authorization, and economic assumptions. A program can follow its written code perfectly while producing an outcome its designers did not intend. Attackers can choose inputs, arrange transactions, interact through other contracts, and exploit the precise order in which state changes and external calls occur.

How the mechanism works

The problem may involve a missing modifier, an incorrectly assigned role, an unprotected initializer, or a mistaken assumption about the caller's identity. Public code makes behavior inspectable, but inspection requires attention to all reachable paths and dependencies. Security reviews, formal methods, tests, and monitoring provide different kinds of evidence. None is a universal certificate covering every later upgrade, configuration change, or interaction with external systems. A review's scope, version, and unresolved findings matter, and a deployed contract can differ from the reviewed artifact.

A worked situation

Consider this hypothetical situation: A hypothetical contract exposes a parameter-setting function that the interface hides from ordinary users but the deployed code does not restrict. Anyone capable of sending the appropriate transaction can call it directly, bypassing the website's visual limitation.

Where interpretation can fail

A user interface is not an enforcement boundary for a public contract, because alternative interfaces and direct calls remain possible. Review the on-chain authorization checks for every sensitive entry point and verify the current role assignments. Permissions must be enforced where execution occurs; hiding an action in the interface does not make the contract reject it.

The wider technical implication

Caller identity can be subtle when contracts call other contracts. A function that assumes the immediate caller is the human user may behave differently when invoked through a router, proxy, or malicious intermediary. Authorization should use the identity and context appropriate to the intended permission model, with explicit treatment of delegation and forwarded calls. Administrative functions also need protection during setup and migration, not only during normal operation. A role correctly configured in a test deployment can be unsafe in production if initialization assigns it to the wrong address or leaves it publicly claimable.

A global perspective

A technical exploit, contractual breach, and regulatory violation are different classifications. Remedies and reporting duties depend on jurisdiction and the actual facts.

Sources & further reading

Ethereum.org — Smart contract security ↗OpenZeppelin Contracts — Access control ↗

Sources checked Oct 27, 2026. Educational examples. Historical observations are attributed to their sources. No affiliation with cited organizations.

Make the idea stick.

Mark complete when you are ready. Reaching the end alone does not mark a lesson complete.

What assumption in this guide would change the result in a different situation? Revisit the example and explain that change in your own words.

Explore crypto →

KEEP THE CONNECTION

Your next useful question.

Your saved guides →