oapp_lz_receive::apply is the entrypoint for LZ to interact with Orderly Solana programs, and there is no access control on who can call such method. This can lead to unauthorized message being parsed and executed.
Root Cause
lib::lz_receive lists open methods of the vault program, to interact with LZ, lz_receive needs to be called in order to receive messages. When lz_receive is called, oapp_lz_receive::apply is executed:
But in this program there is no has_one to restrict who can call this method. This will allow non-LZ endpoint addresses to call this method, when a malicious message is crafted and provided, it can cause unauthorized withdraw and even drain of the vault, as transfer action does not check balance.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Unauthorized call of lz_receive, and can lead to drain of vault.
PoC
No response
Mitigation
Set oapp_lz_receive's admin to be LZ endpoint, and add has_one to ensure access control.
Dizzy Green Mantis
High
Missing access control on
oapp_lz_receive::apply
Summary
oapp_lz_receive::apply
is the entrypoint for LZ to interact with Orderly Solana programs, and there is no access control on who can call such method. This can lead to unauthorized message being parsed and executed.Root Cause
lib::lz_receive
lists open methods of the vault program, to interact with LZ,lz_receive
needs to be called in order to receive messages. Whenlz_receive
is called,oapp_lz_receive::apply
is executed:But in this program there is no
has_one
to restrict who can call this method. This will allow non-LZ endpoint addresses to call this method, when a malicious message is crafted and provided, it can cause unauthorized withdraw and even drain of the vault, as transfer action does not check balance.Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Unauthorized call of
lz_receive
, and can lead to drain of vault.PoC
No response
Mitigation
Set
oapp_lz_receive
's admin to be LZ endpoint, and addhas_one
to ensure access control.