The _mint and _burn functions are marked as internal but have no access control mechanisms in the base contract. Any contract that inherits from this ERC20 implementation can expose these functions publicly without restrictions. There's no built-in role-based access control, ownership pattern, or any mechanism to prevent unauthorized minting or burning. This violates the principle of defense in depth and could lead to severe economic attacks if not properly restricted in inheriting contracts.
Likelihood:
Medium
Impact:
If a developer inheriting this contract accidentally or intentionally exposes mint/burn functions without proper access control, attackers could mint unlimited tokens or burn other users' tokens, leading to complete economic failure of the token.
Declare another contract,and we can call functions from it
Implement a base access control mechanism in the ERC20 contract itself, such as OpenZeppelin's Ownable or AccessControl patterns. At minimum, add internal flags or modifiers that force inheriting contracts to explicitly implement access control
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.