Summary
The contract owner can change the gameContract
address at any time, even after it’s initially set. This could allow a compromised owner to set a malicious contract.
The setGameContract()
function allows the owner to modify the gameContract
address without any restriction once it has been set. This exposes the contract to risk if the owner's account is compromised.
If the owner account is compromised, an attacker could set a malicious contract as the gameContract
, allowing them to mint unlimited NFTs or perform other malicious actions.
Solidity
Access Control Vulnerability Detection
Lock setGameContract()
after it’s first used to prevent changes later:
✅ Once set, the gameContract
address cannot be changed, securing the contract from unauthorized changes.
Owner is trusted and is not expected to interact in ways that would compromise security
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.