# HYPR bridge: re-initialization enables unauthorized token withdrawal

HYPR L1 bridge proxy was re-initialized by attacker, then finalizeERC20Withdrawal was called to mint 2.57M HYPR tokens (~$200k).

- Payout: Real-world hack
- Severity: high
- Program: HYPR
- Analysis by: DeFiHackLabs
- Disclosed: 2023-12-13
- Write-up quality: 6/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2023-12/HYPR_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20231213-hypr
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high technique:source-review vuln:access-control vuln:business-logic

**Target:** L1ChugSplashProxy bridge contract
**Root cause:** The L1ChugSplashProxy contract's initialize function was callable by anyone, allowing the attacker to set themselves as the messenger. This bypassed the cross-domain message sender check in finalizeERC20Withdrawal.
**Steps:**
1. Call `ChugSplash.initialize(address(this))` to set attacker contract as the messenger.
2. Call `ChugSplash.finalizeERC20Withdrawal(address(HYPR), l2Token, address(ChugSplash), address(this), 2_570_000 * 1e18, bytes(""))` to withdraw 2.57M HYPR to attacker.
3. HYPR tokens are transferred to attacker contract.
**Exploitation:** Attacker re-initialized the bridge proxy to control the messenger address, then called finalizeERC20Withdrawal to mint/withdraw 2.57M HYPR tokens to themselves, netting ~$200k.
**Insight:** Bridge proxy contracts with unprotected initialize functions can be re-initialized to hijack privileged roles like messenger, enabling unauthorized withdrawals.
