# Unsafe UTXO Selection Allows DoS via RBF Attack on DA Service

Citrea's Bitcoin DA service selected unconfirmed mempool UTXOs lacking the safe check, letting an attacker RBF-spend them and break commitment transactions, causing DA DoS.

- Payout: Contest reward
- Severity: high
- Program: Citrea
- Credited: blockace
- Disclosed: 2025-10-21
- Write-up quality: 7/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_citrea_jul2025.pdf#3.1.1
- Library page: https://bugbountylibrary.com/r/cantina%3Acitrea_jul2025%3A3.1.1
- Tags: domain:web3 impact:dos kind:contest platform:cantina sev:high tech:payment technique:source-review vuln:dos vuln:race-condition

**Target:** Bitcoin DA service get_utxos / commitment transaction builder
**Root cause:** get_utxos filters on spendable, solvable, and amount but omits the safe field, so unconfirmed mempool UTXOs are selected as inputs for commitment transactions.
**Steps:**
1. Identify DA service wallet address.
2. Send BTC to the DA wallet with RBF enabled, low fee to stay unconfirmed, amount > REVEAL_OUTPUT_AMOUNT.
3. DA service calls get_utxos(); attacker's UTXO passes spendable/solvable/amount but safe=false is unchecked.
4. DA service builds commitment tx via create_da_transactions_with_fee_rate() using that UTXO.
5. Attacker RBF-replaces the original tx to spend the UTXO elsewhere.
6. Commitment tx fails referencing a nonexistent UTXO.
**How found:** Code review of get_utxos in crates/bitcoin-da/src/service.rs observed the filter checked spendable, solvable, and amount but not safe, implying unconfirmed UTXOs could be selected.
**Exploitation:** Attacker needs only enough BTC to exceed REVEAL_OUTPUT_AMOUNT; sends an RBF-enabled low-fee transfer to the DA wallet, waits for it to be picked as input, then replaces it via RBF so the DA commitment transaction becomes invalid.
**Insight:** When auditing UTXO selection, check every bitcoind listunspent flag (spendable, solvable, safe, confirmations) — omitting safe lets attacker-funded unconfirmed outputs be RBF'd out from under your transaction builder.
