Incorrect whitelisting logic in _is_white_listed function causes unauthorized asset bridging.
The _is_white_listed
function contains a logic error that bypasses the whitelist check when the whitelist feature is disabled.
The issue is that the logic above allows all collections to be considered white-listed when white-listing is disabled. If enabled
is true
, the function correctly checks the white list. However, if enabled
is false
, the function always returns true
, bypassing the white list entirely.
It means that when white-listing is disabled, the function considers all collections to be white-listed.
This has a direct impact on the deposit_tokens
function, which calls _is_white_listed
to check if a collection is authorized for bridging.
Due to this bug, when the whitelist is disabled, any collection can be deposited for bridging, regardless of its actual whitelist status.
Also, the is_white_listed function will return true even if a collection is not white listed when enabled is false.
Users can deposit and bridge tokens from any collection.
is_white_listed will also return true for a on-whitelisted collection.
Manual review
Ensure that when white-listing is disabled, the function returns false
for all collections.
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.