Hi,
I have found out some potential bug in the contract 'Trustee.sol' in which the function setNftValue
is massively permissive and can lead to setting any absurd value for the NFT by Trustee.
The key details of this potential vulnerability can be given as follows:
In this contact, the function setNftValue
allows trsutee to set any value for any NFT index without restrictions.
Lack of restrictions on _value
could break assumptions in inheriting contracts i.e. allowing 0 or very large numbers.
Setting incorrect or malicious values could lead to loss of funds.
Manual Code Analysis
Make a custom range for the price of NFT so that trustee can't exploit the function and set very large or very little i.e. 1 wei amount. The sample code implementation can be given as follows (In this example, I am creating a range between 1 ether to 10 ether in which it can differ in your case):
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.