The RamNFT::mintRamNFT function is supposed to be callable only by the Dussehra contract. However, there is no access control in place, allowing anybody to call the function and mint a new NFT for free.
According to the protocol's specification, the mintRamNFT function should only be callable by the Dussehra contract after the user has paid the entranceFee. However, in the current version of the protocol, the mintRamNFT function can be called by anybody, resulting in a free NFT mint.
Add the following test in test/Dussehra.t.sol.
The test shows that player1 can call the mintRamNFT function, passing no value, and mint a new NFT.
It could reduce the amount of fees collected by the protocol.
It could allow a malicious user to mint a large number of tokens. If the organizer executes ChoosingRam::selectRamIfNotSelected, the malicious user could have a higher chance of being randomly selected as Ram once the event has concluded.
Manual review.
Add a modifier or a require statement to ensure that the caller of the function (msg.sender) is the Dussehra 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.