A critical vulnerability has been identified in the Trustee.sol contract where the trustee address remains uninitialized at deployment. This prevents trustee-restricted functions from being executed until a trustee is explicitly appointed, leading to unexpected contract behavior.
The contract declares a trustee address but never initializes it. In Solidity, state variables that are not explicitly initialized default to 0x0 (the zero address). This leads to a critical security issue:
Before the trustee is set, no valid address is assigned to it.
Any external account (EOA or contract) can potentially call functions restricted by onlyTrustee, depending on how the contract is deployed or inherited.
This can lead to unauthorized modifications of sensitive contract state, including:
Changing NFT values (setNftValue)
Changing the asset used for payments (setAssetToPay)
Unauthorized control over NFT valuation.
Unauthorized asset redirection (if the contract handles payments or token transactions).
Potential complete contract compromise if this contract is meant to act as a gatekeeper for asset management.
By default, trustee is initialized to address(0) (the zero address).
The onlyTrustee modifier prevents anyone from calling functions that require trustee privileges:
Since trustee == address(0), no valid Ethereum address can match this check, making onlyTrustee functions permanently unusable.
Manual Review
Initialize trustee in the constructor:
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.