# Malicious Users Can Perpetually Lock `feeRecipient` Shares via Targeted Lockup Reset

ShareManager.mint applies targetLockup to feeRecipient shares; attacker redeems tiny amounts to reset the lock and permanently freeze protocol fees.

- Payout: Audit contest
- Severity: medium
- Program: Mellow Flexible Vaults
- Found by: 0x23r0
- Disclosed: 2025-07-12
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-07-mellow-flexible-vaults-judging/issues/711
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-07-mellow-flexible-vaults%3AM-8
- Tags: area:web3 domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:business-logic vuln:dos

**Target:** ShareManager.mint / feeRecipient share accounting
**Root cause:** mint() sets accounts[account].lockedUntil = block.timestamp + targetLockup for every recipient, including feeRecipient, so each fee mint resets the feeRecipient's lock timer.
**Steps:**
1. Attacker deposits assets into vault to hold shares.
2. Wait until feeRecipient's lockedUntil is near expiry.
3. Redeem a minimal share amount so calculateRedeemFee yields fees > 0, triggering `shareManager.mint(feeManager.feeRecipient(), fees)`.
4. mint resets feeRecipient.lockedUntil to now + targetLockup.
5. Repeat before each expiry; any feeRecipient transfer/withdraw reverts with `TargetedLockupNotExpired`.
**How found:** Code reading of mint() showed targetLockup applied unconditionally to all recipients; noticed fee mints route to feeRecipient, making its lock resettable by any user-triggered fee event.
**Exploitation:** Attacker with a small vault position repeatedly redeems minimal amounts just before the feeRecipient lock expires, each redemption minting a tiny fee that resets the lock, indefinitely blocking feeRecipient from moving accrued fees.
**Insight:** When a lock/cooldown is set inside a shared mint path, check whether third parties can trigger mints to a privileged recipient (fee sink) and thus reset its timer; fee-recipient addresses should be exempt from per-user lockups.

