The WeatherNft::fulfillMintRequest
function does not prevent multiple executions with the same requestId
, allowing anyone to repeatedly call fulfillMintRequest
after a single paid mint request. As a result, an attacker can mint unlimited NFTs for free after the initial payment, severely breaking the one-NFT-per-payment guarantee and destroying the scarcity and value of the NFTs.
The contract does not track whether a requestId
has already been fulfilled.
Anyone (including the original minter) can call fulfillMintRequest
multiple times with the same requestId
.
Each call after the first is effectively free, as only the initial mint required payment.
Likelihood:
Anyone aware of a fulfilled requestId
can script multiple calls, leading to fast, repeated free mints.
Impact:
Unlimited NFTs can be minted for a single payment, creating free NFTs after the first.
This destroys the payment model and completely breaks scarcity, causing financial and reputational harm to the protocol and its users.
This PoC demonstrates that fulfillMintRequest
can be called multiple times with the same requestId
, resulting in multiple NFTs minted for the same weather data and payment.
An attacker initiates a mint request by calling requestMintWeatherNFT
, paying the required mint price and emitting a WeatherNFTMintRequestSent
event with the associated requestId
.
The Chainlink oracle fulfillment is simulated, making the mint request ready for completion.
The attacker calls fulfillMintRequest
with the same requestId
to mint the first NFT.
The attacker calls fulfillMintRequest
again with the same requestId
, successfully minting a second NFT—despite only having paid for one mint.
Because there is no mechanism to prevent multiple fulfillments for the same requestId
, this process can be repeated indefinitely, allowing the attacker to mint unlimited NFTs for a single payment.
Manual Review
Foundry Unit Testing
Ensure One-Time Fulfillment
Track fulfillment status for each requestId
and prevent duplicate calls:
This ensures each requestId
can be used to mint only one NFT, preventing duplication and maintaining NFT scarcity.
The `WeatherNFT::fulfillMintRequest` allows a malicious user to call multiple times the function with the same `requestId`.
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.