Anyone can call the updateCountMartenitsaTokensOwner::MartenitsaToken.sol
funciton and manipulate the token counting system.
The updateCountMartenitsaTokensOwner::MartenitsaToken.sol
is external and has no modifiers which allows everyone to call it and manipulate the token counting system.
Adding this test in the MartenitsaToken.t.sol
shows how anyone can call countMartenitsaTokensOwner
and change the count for any address:
All the functionalities relying on this mapping become useless. For example, one can inflate their countMartenitsaTokensOwner
without purchasing any MT, then exploit the collectReward:MartenitsaMarketplace.sol
function to obtain HT.
Manual Review
Remove the updateCountMartenitsaTokensOwner::MartenitsaToken.sol
funciton and the countMartenitsaTokensOwner:MartenitsaToken.sol
mapping. Instead, utilize the balanceOf::ERC721.sol
, which tracks the number of tokens owned by each address.
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.