# Malicious user can grief withdrawing users via VUSD reentrancy

VUSD.processWithdrawals sends ETH via call to user, letting a malicious contract reenter deposit/withdraw to bloat the FIFO queue and grief other withdrawers with gas costs.

- Payout: Contest reward
- Severity: medium
- Program: Hubble Exchange
- Credited: 0x3e84fa45
- Disclosed: 2023-04-16
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-04-hubble-exchange-judging/issues/153
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-04-hubble-exchange%3AM-7
- Tags: domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:chained technique:source-review vuln:dos vuln:reentrancy

**Target:** VUSD stablecoin contract processWithdrawals/withdraw
**Root cause:** processWithdrawals uses a raw call to withdrawal.usr with no reentrancy guard on mintWithReserve/withdraw/withdrawTo, so the receiver can reenter and append new withdrawals to the queue mid-loop.
**Steps:**
1. Deploy malicious contract with a receive() that calls VUSD deposit then withdraw/withdrawTo, re-queuing itself.
2. Call VUSD.withdraw to queue a withdrawal whose usr is the malicious contract.
3. When processWithdrawals loops and calls the contract with ETH, receive() reenters to deposit and withdraw, appending new entries to withdrawals.
4. Queue grows; FIFO ordering forces honest users to process all malicious entries, wasting their gas.
**How found:** Code review of processWithdrawals loop: noticed raw call to withdrawal.usr triggers receiver code, and that mintWithReserve/withdraw/withdrawTo lack nonreentrant, enabling queue growth during iteration.
**Exploitation:** Attacker queues a withdrawal to a contract whose receive() re-deposits and re-withdraws on each ETH payout, indefinitely extending the withdrawals array at no recurring cost; honest withdrawers must process the bloated queue first.
**Insight:** When a payout loop iterates a user-controlled array and sends ETH via call, check whether the receiver can reenter to append to that same array—queue-length growth is a griefing vector even without fund theft.
