The account is not verified, which may lead to self-transfers and cause vault assets to inflate
Summary
Using the /// CHECK annotation in conjunction with the unconstrained AccountInfo<'info> type bypasses Anchor's built-in security verification mechanisms, potentially triggering self-transfers and increasing the amount of USDC in the vault.
Jovial Lilac Sloth
High
The account is not verified, which may lead to self-transfers and cause vault assets to inflate
Summary
Using the
/// CHECK
annotation in conjunction with the unconstrainedAccountInfo<'info>
type bypasses Anchor's built-in security verification mechanisms, potentially triggering self-transfers and increasing the amount of USDC in the vault.Root Cause
In
oapp_lz_receive.rs:31-54
:creates a fake user:
let (vault_authority, _) = Pubkey::find_program_address(&[VAULT_AUTHORITY_SEED], ctx.program_id);
At this time, the associated_token::authority is the same. In
oapp_lz_receive.rs:67-69
:Internal pre-conditions
The
user
has been set tovault_authority
External pre-conditions
None
Attack Path
user
asvault_authority
apply
functionImpact
The number of USDC assets in the vault has inflated
PoC
No response
Mitigation
Verify that the
user
and ensure that thevault_deposit_wallet
anduser_deposit_wallet
are different