The current implementation of message cancellation functionality in the Starknet blockchain's L1 -> L2 messaging mechanism is flawed. Specifically, the ownership verification required for canceling messages does not correctly authenticate the message sender, thereby preventing message initiators from canceling their own messages as intended.
The vulnerability in the startRequestCancellation()
function in Bridge.sol
arises from the misuse of the onlyOwner
modifier, which restricts cancellation rights to the contract owner rather than the original message sender. This prevents the actual request owner, as specified in the ownerL1
field, from canceling their own request, contrary to Starknet's intended design. This flaw centralizes cancellation authority with the contract owner, potentially leading to abuse, where users are unable to cancel their requests, causing delays or financial losses.
The request owner cannot cancel his own request, as he should be able to.
Manual review
Make sure that request owner can start cancelation process. For example remove onlyOwner
modifier and add:
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.