In the contract, the fulfillMintRequest(bytes32 requestId, bytes memory response, bytes memory err)
function does not verify whether the caller is the user corresponding to the request ID (requestId
). This allows anyone to use another person's requestId
to mint NFTs, thereby transferring ownership of the NFTs that should belong to others to themselves.
Impact:
The NFT is minted to the wrong address.
User A initiates a request via requestMintWeatherNFT()
.
The chain triggers an event or stores the requestId
.
Attacker B monitors the chain events (such as WeatherRequestSent
) and obtains this requestId
.
B forges a call to fulfillMintRequest(requestId, ...)
.
The contract mints the NFT, which was supposed to be minted to A, to B instead.
Add permission verification logic in fulfillMintRequest
to ensure that only the original requester can complete the minting.
There is no check to ensure that the caller of the `fulfillMintRequest` function is actually the owner of the `requestId`. This allows a malicious user to receive a NFT that is payed from someone else.
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.