Checking access control
Last updated
Last updated
In Solidity, access control attacks may occur when a function that has important logic/restrictions is left without any access checks.
This could imply:
Logic that changes the owner
Authorization logic
Using delegatecall to access functions in proxy contracts
An example of a function vulnerable to an access exploit is as follows:
We can clearly see that this function is left in a state where anyone can access it and change the owner, stealing the contract.