The performUpkeep
function can be called by any external account, allowing anyone to trigger the update of a weather NFT they do not own. This causes two major issues:
The NFT's lastFulfilledAt
timestamp is updated without the owner's consent.
If the owner relies on the Chainlink automation to update the weather, this can desynchronize the schedule defined by the heartbeat
, potentially skipping an actual weather update at the expected time.
This behavior directly affects the NFT's behavior and value, and violates the user’s assumptions about trust and update logic.
Likelihood:
This could occur at any time since there is no authorization check, which makes the issue systemic and trivial to exploit.
Impact:
The attacker can interferes with the automation mechanism that the user paid for (via LINK deposit).
The attacker could intentionally delay or desynchronize NFT updates, effectively DoS-ing the NFT automation.
Add the following code to WeatherNftForkTest.t.sol
:
A user mints a weather NFT and sets up automation.
A different address is able to freely call performUpkeep
with the correct performData
.
The contract emits NftWeatherUpdateRequestSend
, proving that the update process was initiated.
This shows that ownership is not checked, and anyone can call performUpkeep
for any NFT.
Consider adding a check to the performUpkeep
function to verify that the msg.sender
is the owner of the NFT
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.