sh1v - [High] Missing deposit_token
Validation in Orderly Vaults deposit Instruction Allows Unauthorized Cross-Chain Transfers
#166
Labels
Sponsor Confirmed
The sponsor acknowledged this issue is valid
sh1v
High
[High] Missing
deposit_token
Validation in Orderly Vaults deposit Instruction Allows Unauthorized Cross-Chain TransfersSummary
The missing validation of
deposit_token
in the deposit instruction within the Orderly Vaults implementation allows attackers to deposit arbitrary tokens, potentially leading to unauthorized fund transfers across chains. Based on the LayerZero OFT model, which verifiestoken_mint
during send instructions, Orderly Vaults should similarly validate token_mint in the deposit instruction to prevent unauthorized tokens from being deposited and transferred.Root Cause
The design of the deposit instruction in Orderly Vaults does not validate
deposit_token
, allowing it to act as a free account rather than verifying it as the intended token. Without validation, arbitrary tokens can be deposited and processed for cross-chain transfers, compromising the security of the Orderly Vaults system.https://github.com/sherlock-audit/2024-09-orderly-network-solana-contract/blob/main/solana-vault/packages/solana/contracts/programs/solana-vault/src/instructions/vault_instr/deposit.rs#L49
Internal pre-conditions
deposit_token
validation.External pre-conditions
deposit_token
is the expected token for deposits.Attack Path
DepositParams
with an arbitrary token account.deposit_token
validation, the deposit is accepted, allowing the attacker to bypass expected token requirements.Impact
Orderly Vaults could suffer losses as unauthorized tokens are deposited and transferred across chains. This vulnerability allows users to send arbitrary tokens that are not verified against
deposit_token
, which can lead to misuse of the cross-chain transfer mechanism and potential fund siphoning.PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: