Description the RamNFT::mintRamNFT
function lacks any access control and therefore is callable by anyone, meaning anyone to mint RamNFT's.
as this is a public function, anyone with the function calldata can call this function and mint as many NFTs as they want. As per the documentation this should only be callable by the Dussehra
contract.
Impact Many NFTs could be minted to users that are not operating within the protocol as intended.
Proof of Concepts (Proof of Code)
Add the following code to Dussehra.t.sol
Recommended mitigation As this function is only intended to be called by the Dussehra
contract consider adding an onlyDussehra
modifier to the contract as such:
add a state variable:
add a function to set the dussehra
contract by the organiser:
add the modifer:
add the modifier to the 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.