Description:
The constructor function initializes key contract variables but does not validate inputs like bridge_admin
, bridge_l1_address
, and erc721_bridgeable_class
.
Location: constructor
function in apps/blockchain/starknet/src/bridge.cairo
, from line - 89 in the constructor
function.
Issue:
Without validation, there’s a risk of initializing the contract with incorrect or malicious addresses, which could compromise the contract’s functionality.
Impact:
Improper initialization could lead to unauthorized control over the contract or malfunctioning of the bridge.
Tools used: Manual Review.
Recommendations:
Add validation checks to ensure that the addresses passed to the constructor are valid non-zero addresses.
Potential changes:
Add assert
statements to the constructor to validate the inputs.
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.
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.