Skip to content

HIGH: withdraw_continuous missing caller authentication — anyone can drain stream balances #49

Description

@leanworld7-netizen

HIGH: withdraw_continuous missing caller authentication — anyone can drain stream balances

Function Affected

  • withdraw_continuous (L7601) — public, zero require_auth() on caller

Root Cause

withdraw_continuous calls withdraw_from_flow (L2849) with no authentication check on the caller. The internal function only validates withdrawal_amount > 0 and accumulated_balance >= withdrawal_amount. Any caller can drain any stream's accumulated balance.

Attack

  1. Attacker calls withdraw_continuous(victim_stream_id, stream_balance)
  2. withdraw_from_flow subtracts withdrawal_amount from flow.accumulated_balance
  3. Stream balance is zeroed — legitimate provider cannot withdraw their own funds
  4. Attacker repeats across all streams

Impact

  • Fund destruction: Stream accumulated_balance is reduced to zero for all streams
  • Provider lockout: Legitimate providers lose access to their accumulated earnings
  • No gain for attacker — pure griefing/DoS, but financial damage to all stream providers is real

Severity

HIGH — per SECURITY.md section 4.1, High = $5K-$10K bounty.

Fix

Add flow.provider.require_auth() before calling withdraw_from_flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions