NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Validate Whitelisted Addresses

One of the core features of the Starklane bridge is its ability to whitelist specific collections for deposits and transfers. However, as I reviewed the whiteList function, I realized that there was no validation to ensure that the address being whitelisted was legitimate.

In a worst-case scenario, an attacker could add a malicious contract to the whitelist, allowing it to interact with the bridge and potentially exploit it for unauthorized actions.

Description: The whiteList function allows any address to be whitelisted without validation, potentially leading to unauthorized contracts being added to the whitelist and malicious operations.

Location: whiteList function in ethereum/src/IStarklane.sol

Issue: The whiteList function allows any address to be whitelisted without proper validation. Malicious or unintended addresses could be whitelisted, leading to security risks.

Impact: Malicious contracts could be whitelisted, leading to unauthorized token transfers or other malicious activities.

Tools used: Manual Review.

Recommendations: Add validation checks before whitelisting addresses to ensure they are valid and intended.

Potential changes: I proposed adding validation checks to ensure that only legitimate, intended contracts could be whitelisted. This simple check would reduce the risk of unauthorized contracts being granted access to the bridge.

function whiteList(address collection, bool enable) external onlyOwner {
require(collection != address(0), "Invalid collection address.");
// Additional validation logic if needed...
_whiteListCollection(collection, enable);
emit CollectionWhiteListUpdated(collection, enable);
}
Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

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