The load()
function in the WithdrawalRequest.sol
contract does not enforce any access control mechanisms, allowing anyone to read sensitive withdrawal request data. This lack of restriction exposes information about pending withdrawals, making it possible for malicious actors to monitor and front-run large withdrawal transactions, leading to market manipulation and economic losses.
Affected Contract: WithdrawalRequest.sol
Affected Function: load()
The function lacks access control, meaning anyone can call it and retrieve details about pending withdrawal requests.
A front-running bot calls load()
to monitor withdrawal requests.
The bot identifies a large withdrawal that will affect the asset’s price.
The bot trades ahead of the withdrawal to profit from the price impact.
The function is defined as internal
, but it can still be accessed within the smart contract ecosystem. There is no access control mechanism to restrict unauthorized users from retrieving withdrawal request details.
Information Disclosure Sensitive withdrawal request details are exposed to the public.
Market Manipulation Malicious traders can monitor withdrawals and front-run transactions.
Economic Loss |Traders executing large withdrawals may suffer from price slippage caused by frontrunners. |
Foundry: For testing and simulating the exploit.
VS Code: Smart contract review.
Slither: Static analysis tool to detect access control vulnerabilities.
The following Foundry test simulates an attacker reading withdrawal request data using the load()
function.
load()
**This test passes if the unauthorized user fails to retrieve the withdrawal request data due to an added access control mechanism.
Restrict load()
to only authorized users (e.g., vault managers or contract owners). Modify the function to enforce access control:
Use Role-Based Access Control (RBAC)
Implement Ownable
or AccessControl
to restrict function access.
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.