# Approving another address to use your debt share tokens allows them to borrow funds in your name

Silo's ShareDebtToken.mint() honors standard ERC20 approve, letting an approved spender borrow in the owner's name and stick them with the debt.

- Payout: Contest reward
- Severity: medium
- Program: Silo
- Credited: Ruhum
- Disclosed: 2025-03-19
- Write-up quality: 6/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_silo.pdf#3.2.8
- Library page: https://bugbountylibrary.com/r/cantina%3Asilo%3A3.2.8
- Tags: domain:web3 impact:funds-loss kind:contest platform:cantina sev:medium tech:evm tech:solidity technique:source-review vuln:access-control vuln:accounting-error vuln:business-logic

**Target:** ShareDebtToken / Silo lending market
**Root cause:** ShareDebtToken.mint() checks the standard ERC20 allowance instead of the dedicated receiveAllowance, so a plain approve() is treated as consent to receive new debt shares.
**Steps:**
1. Alice deposits collateral and borrows via `borrowSameAsset(borrowAmount, alice, alice)`, receiving debt shares.
2. Alice calls `debtShareToken.approve(bob, borrowAmount)` expecting only transfer rights.
3. Bob calls `ISilo(silo1).borrowSameAsset(borrowAmount, bob, alice)`; mint() consumes Alice's standard allowance and mints debt shares to Alice.
4. Bob receives the underlying tokens; Alice's debt shares double (assertEq 2e14).
**How found:** Code review of ShareDebtToken.mint() noting it uses standard allowance rather than the protocol's purpose-built receiveAllowance consent mechanism, contradicting the design intent of preventing unsolicited debt increases.
**Exploitation:** A malicious spender convinces a victim to approve debt share tokens (a seemingly harmless tx), then calls borrowSameAsset with themselves as receiver and the victim as debt-share recipient, extracting the borrowed underlying while the victim absorbs the debt.
**Insight:** When a protocol adds a custom consent mechanism (receiveAllowance) alongside standard ERC20 approve, check every mint/transfer path for places still reading the plain allowance — the custom guard is only as strong as its weakest call site.
