Skip to content
Security
← V4 known risks
V4-31Not a defectOpenSpending limits

Spending limits can't transfer tokens whose mint requires a transfer hook

Spending-limit transfers pass no extra accounts, so Token-2022 mints with a transfer hook fail through a spending limit.

Why this is a risk, not a vulnerability · Documented behavior

Transfer hooks are an opt-in Token-2022 extension that applies only to mints that enable it. The behavior comes from the token standard, not from a missing check in the program. What is a vulnerability
Program
Squads V4
Source
Public program behavior
Code
View at dcac867

spending_limit_use transfers tokens with a single transfer_checked call and passes only the vault, mint, and destination accounts. A Token-2022 mint with the transfer hook extension requires extra accounts that the spending-limit instruction doesn’t accept, so the transfer fails. Mints without the extension, and all SPL Token mints, are unaffected.

Vault transactions are unaffected: they carry whatever accounts the stored instructions need, including a hook’s extra accounts.

What to do

  • Don’t rely on a spending limit for a Token-2022 mint that uses a transfer hook. Move those tokens through a vault transaction instead.
  • Integrators: check a mint’s extensions before offering it as a spending-limit asset.