The GetWeather.js
is responsible for fetching weather data based on a postal code and country ISO code provided by the user. The script first makes a geocoding request to the OpenWeatherMap API to convert the postal code into latitude and longitude coordinates. This initial geocoding API call is made using an insecure HTTP connection.
Using HTTP for this API call exposes the request and response to Man in the Middle attacks. An attacker on the network path between the Chainlink node and the OpenWeatherMap API server can intercept or modify the data in transit. While the subsequent call to fetch the actual weather data uses HTTPS, it relies on the latitude and longitude obtained from the insecure HTTP geocoding call. When these coordinates are manipulated the entire weather fetching process is compromised.
Likelihood:
A Chainlink node executes the GetWeather.js
script, triggering an API call to the OpenWeatherMap geocoding service via an unsecured HTTP channel.
An adversary successfully intercepts and manipulates the network traffic of this HTTP request or its response between the Chainlink node and the API server
Impact:
An attacker can modify the latitude and longitude in the geocoding API response. This will cause the script to request weather data for an incorrect location in the API call.
The smart contract will receive weather data for the attacker chosen location not the user specified one. This results in the Weather NFT being minted with inaccurate weather attributes or an existing NFT's weather status being updated incorrectly.
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.