USDC blacklisted accounts can DoS the withdrawal system
The withdrawal system processes queued withdrawals in a loop, but a transfer to a USDC-blacklisted address fails and the blacklisted user is never removed, causing the entire withdrawal queue to be blocked. An attacker could use a blacklisted address to prevent all other users from withdrawing.
Submitted by throttle
DoS of USDC withdrawal system
Proof of Concept
Currently, withdrawals are queued in an array and processed sequentially in a for loop.
However, a safeTransfer() to USDC blacklisted user will fail. It will also brick the withdrawal system because the blacklisted user is never cleared.
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L53-L67
Recommended Mitigation Steps
Possible solutions: 1st solution: Implement 2-step withdrawals:
- In a for loop, increase the user’s amount that can be safely withdrawn.
- A user himself withdraws his balance
2nd solution: Skip blacklisted users in a processWithdrawals loop
Interesting! Yes, this would be bad.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
A USDC-blacklisted address can cause a denial of service, preventing all users from withdrawing their funds.
What the attacker needed
A USDC-blacklisted address; the address has a pending withdrawal
The fix
The withdrawal system should be changed to skip blacklisted users or use a two-step withdrawal process where users withdraw their own funds.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
USDC is a stablecoin that can blacklist addresses, meaning those addresses cannot send or receive USDC. The withdrawal system tries to send USDC to each user in a queue, but if one user is blacklisted, the transfer fails and the system gets stuck, so no one else can withdraw.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.