Weather Witness

First Flight #40
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Function WeatherNft::fulfillMintRequest does not take into account already fulfilled mint requests

Description

Function WeatherNft::fulfillMintRequest can be called using an id of already processed request. This allows to mint an NFT for free. In addition, the new minted NFT will not affect current mint price that must increase with each new NFT.

Risk

Likelihood: High

User can use any minted NFT request id to mint an NFT for free

Impact: High

  1. Users can mint as many NFTs as they want for free

  2. If the original request was created with registerKeeper set to true, a new Chainlink automation is registered with each new minted NFT. Since LINK is transferred only once in WeatherNft::requestMintWeatherNFT, all other automations will spend LINK without any additional deposits. An attacker can repeatedly mint NFTs with registerKeeper set to true and waste all contract LINK

Recommended Mitigation

Function WeatherNft::fulfillMintRequest must revert if the request with passed id is already fulfilled.

Updates

Appeal created

bube Lead Judge 13 days ago
Submission Judgement Published
Validated
Assigned finding tags:

Multiple tokens for one `requestId`

The `WeatherNFT::fulfillMintRequest` allows a malicious user to call multiple times the function with the same `requestId`.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.