The WeatherNft contract allows users to request new NFTs by calling requestMintWeatherNFT
, which initiates a Chainlink Functions request to fetch weather data.
However, the fulfillMintRequest
function that completes the minting process has no access control to ensure that only the original requester can mint their NFT.
Likelihood: High
The vulnerability is immediately exploitable once a Chainlink Functions response is available
Any transaction monitoring the mempool can frontrun legitimate users' fulfillment calls
No technical barriers prevent exploitation
Impact: High
Attackers can steal all NFTs by monitoring for Chainlink Functions responses and calling fulfillMintRequest
before legitimate users
Users lose the ETH paid for minting (s_currentMintPrice) plus any LINK tokens provided for keeper registration
Malicious actors can gain ownership of NFTs they didn't pay for, along with their associated Chainlink Automation upkeeps
Ensure only the original requester can fulfill their mint request:
Alternatively, implement an automatic fulfillment mechanism that doesn't require users to call a separate function.
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.