An access control vulnerability exists in the refundSwap(uint128,address)
function of the StabilityBranch
contract. The function does not enforce the onlyRegisteredSystemKeepers
modifier, allowing any user to invoke the refund process. This can enable malicious actors to trigger unwanted or premature refunds of swap requests, potentially interfering with normal user operations and system integrity.
Location:
Contract: StabilityBranch
Function: refundSwap(uint128,address)
Relevant File Snippet:
Finding:
Because there is no access control modifier (e.g., onlyRegisteredSystemKeepers
or equivalent) on refundSwap
, any externally owned account can call this function. Attackers can maliciously refund a swap request, causing unwarranted token flows or blocking legitimate swaps from being fulfilled.
By exploiting the missing modifier, a malicious user could:
Disrupt Active Swaps: Force refunds of valid, in‐progress swap requests.
Cause Financial or Operational Damage: If refunds are executed unexpectedly, users could lose opportunities to execute favorable swaps, and the system might behave unpredictably.
Undermine Trust in the Platform: Users rely on the expectation that only authorized entities (keepers or administrators) can process certain sensitive functions. This vulnerability breaks that assumption.
Manual Code Review: The absence of an access control modifier was identified through direct inspection of refundSwap
.
Restrict Access
Apply the onlyRegisteredSystemKeepers
modifier (or a similarly restrictive modifier) to the refundSwap
function.
Example:
This ensures that only privileged entities (trusted keepers) can execute this sensitive action.
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.