Vulnerability: Improper Access Control

Description:

An access control vulnerability is a security flaw that allows unauthorized users to access or modify the contract’s data or functions. These vulnerabilities arise when the contract’s code fails to adequately restrict access based on user permission levels. Access control in smart contracts can relate to governance and critical logic, such as minting tokens, voting on proposals, withdrawing funds, pausing and upgrading the contracts, and changing ownership.

Example (HospoWise Hack):

function burn(address account, uint256 amount) public { //No proper access control is implemented for the burn function
        _burn(account, amount);
    }
}

Impact:

Remediation:

Examples of Smart Contracts That Fell Victim to Improper Access Control Attacks:

  1. HospoWise Hack : A Comprehensive Hack Analysis
  2. LAND NFT Hack : A Comprehensive Hack Analysis