Missing check for caller is MartenitsaMarketplace in updateCountMartenitsaTokensOwner
function in MartenitsaToken.sol
contract
The updateCountMartenitsaTokensOwner
function can be called by anyone which allows an attacker to increase the count of Martenitsa tokens owned by an address. This can be used to exploit the collectReward
function in the MartenitsaMarketplace.sol
contract to collect more health tokens as he wants.
put this test in MartenitsaToken.t.sol
Run this test case using the following command
Someone can call the updateCountMartenitsaTokensOwner
function in the MartenitsaToken.sol
contract to increase the count of Martenitsa tokens owned by an address
This can be used to exploit the collectReward
function in the MartenitsaMarketplace.sol
contract to collect more health tokens as he wants
attacker can collect as many health Token as he wants
Manual review
Update the updateCountMartenitsaTokensOwner
function in MartenitsaToken.sol
contract to include a require that checks if the caller is the marketplace contract.
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.