Unvalidated user input in the location
field enables Oracle URL injection, leading to off-chain data manipulation.
The application takes a user-provided location
string and directly embeds it into the URL passed to Chainlink Functions.
An attacker can submit a crafted location
(e.g., containing URL fragments or redirects) to manipulate the request or potentially trick the oracle into fetching attacker-controlled data.
Likelihood:
User input is used directly in the oracle request URL.
No sanitization, validation, or filtering is applied.
Impact:
Weather data can be faked to trigger invalid conditions in NFT minting logic.
Can lead to issuance of NFTs based on fake weather events.
The following execution of getWeather.js
demonstrates how a malicious actor could manipulate the request:
This modifies the actual request URL to:
Depending on how the oracle parses this, it may fetch from the attacker's endpoint.
Add strict validation on the location
parameter in getWeather.js
.
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.