WeatherNft::performUpkeep can be called by anyone with any parameterDescription:
The performUpkeep function haven't any address or input data validation in his performData parameter, making it can be called from any address and with any parameter
Impact:
If the decoded performData is a valid TokenId: the related token update his wheather data.
If the decoded performData is not a valid TokenId: the WeatherNft contract will send a request to chainlink functions a invalid request.
In all scenarios, unauthorized calls to performUpkeep can waste gas and deplete the contract's LINK balance.
Proof of Concept:
Add the following to the test suite:
Recommended Mitigation:
Allow only the Weather Nft Owner and the related Keeper to call performUpkeep
Example:
The `performUpkeep` function should be called by the Chainlink keepers or owners of the NFT. But there is no access control and anyone can call the function. This leads to malicious consumption of the user's LINK deposit.
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.