In-depth lesson · Missing access control in contracts
Tips for beginners
Every point the Missing access control in contracts reports back under this heading, best-backed first, each with the reports it is seen in.
-
List every external and public function and ask who should be allowed to call it. Look for missing modifiers on setters, fee changes, minting, burning, and withdrawal functions. A quick test is to call the function from a fresh account and see whether it succeeds when it should not.
Seen in 6 reports
-
Start with the initialisation and upgrade paths. Check whether the implementation contract behind a proxy can be initialised by anyone, and whether the initialiser uses a dedicated boolean flag rather than a caller-settable value. If you can become owner or guardian, demonstrate that you can then upgrade or change critical configuration.
Seen in 5 reports
-
For signature-based flows, check what the signed hash actually covers. Does it include the verifying contract address, a nonce, the operation type, the submitter, and all configuration parameters? Try reusing a signature across two operations or two collections, or changing an unsigned field such as the recipient or amount.
Seen in 5 reports
-
When you find a missing access control, show concrete impact. Becoming owner is not enough on its own; demonstrate that you can then drain funds, mint tokens, or upgrade to a malicious implementation. If the impact is only a configuration change with no further consequence, it may be considered low or out of scope.
Seen in 5 reports
-
Check delegatecall targets carefully. If a function takes a target address from the caller and delegatecalls it, you likely have arbitrary storage write or self-destruct. Also check precompiles that may not distinguish delegatecall from a regular call.
Seen in 4 reports
-
Pay attention to zero-address handling. Delegation to the zero address, transfers to the zero address, and zero taker or sender addresses can remove votes or funds without crediting anyone, or let a privileged role restrict who can fill orders. Check whether the code rejects zero where it should.
Seen in 3 reports
-
Do not report missing access control on a function that is intentionally public and has no privileged effect. Read the documentation and the surrounding code to understand the intended authorisation model. Reporting an out-of-scope or by-design public function is a common beginner mistake.
-
For airdrops and batch operations, check for a cap on user-supplied array length and for access control on the claim function. An unbounded loop can be used to grief or to exhaust gas, and a public claim can let anyone drain the pool.
-
Use the project's own test suite or a local fork to reproduce the issue safely. Do not run destructive tests on mainnet. If you must demonstrate on a live network, use a minimal proof and avoid causing harm.
-
Check for replay across domains and chains. If a signature lacks a chain ID or verifying contract, it may be replayable on a fork or another deployment. This is a common variant of missing access control in signature schemes.
-
Read the scope carefully. Some programs exclude certain contract types or require a specific impact. If you find a missing check but cannot show a realistic path to loss of funds or control, consider whether it meets the program's criteria before reporting.
-
Look at branch coverage. If a function has multiple branches, check that each branch performs the same critical operations, such as minting principal tokens after moving funds. A missing call in one branch can be an access control or accounting flaw.
Seen in 1 report
-
Verify that plugin registration and similar extension points validate that the address is a valid plugin bound to this vault and not already registered. An invalid or duplicate plugin can break accounting or double-count balances.
Seen in 1 report
-
When testing upgradeable contracts, confirm that the base contract actually inherits the upgradeable proxy implementation and exposes an upgrade authorisation function. A missing inheritance can mean no upgrade authorisation exists at all.
Seen in 1 report