The contract WToken.sol sets _owner to a specific address in the constructor but does not provide a way to change ownership.
Currently, the contract's owner is set in the constructor:
Since _owner is private and there is no function to change it, ownership is permanently fixed. If the owner address needs to be updated due to key loss, governance changes, or delegation needs, it is impossible.
If the owner loses access to their private key, minting and burning operations become permanently unavailable.
The contract lacks flexibility for governance upgrades.
No way to transfer ownership to a new entity.
PoC for Hardcoded Owner Address
Overview
The WToken contract assigns _owner in the constructor but does not provide a way to change it later. This means if the deployment is incorrect or the owner loses access to their wallet, the contract cannot be managed properly.
Actors
Attacker: No direct attacker, but the vulnerability impacts protocol flexibility.
Victim: The contract owner, who cannot transfer ownership.
Protocol: WToken contract.
Working Test Case
This test will verify that ownership is permanently set at deployment and cannot be changed.
Deploy WToken with an owner.
Attempt to change the _owner variable after deployment.
Verify that ownership is immutable.
Exploit Scenario
The deployer mistakenly sets the wrong address as _owner.
The assigned owner loses their private key or wallet.
The contract can no longer mint or burn tokens, making it unusable.
Manual code review
Implement an Ownable pattern with a transferOwnership function:
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.