Cuddly Gauze Mustang
High
In the current implementation, multiple instructions make the assumption that accounts are owned by the current program (so are trusted) but they are not. This allows user to provide external accounts to bypass checks.
- Lack of seeds constraint every time
wooconfig
is used (for example:create_wooracle.rs#L44
)
Other occurences in claim_fee.rs
, create_pool.rs#L9
, deposit_withdraw.rs#L9
, and everywhere else in the codebase.
No response
No response
- User creates a wooconfig account owned by himself
- User uses this wooconfig account through the WooFi instructions to bypass checks
Multiple checks are bypassed, including access control checks.
No response
Every time wooconfig
is expected, ensure that the account is the correct PDA.
For example, in the CreateWooracle
structure, it gives:
#[derive(Accounts)]
pub struct CreateWooracle<'info> {
#[account(
seeds = [
WOOCONFIG_SEED.as_bytes(),
],
bump)]
pub wooconfig: Box<Account<'info, WooConfig>>,