SW001critical
Missing signer check
AccountInfo or UncheckedAccount fields with authority-role names lacking signer constraints — allows attackers to pass unsigned accounts as authorities.
SW002critical
Missing owner check
AccountInfo or UncheckedAccount fields with no owner or address constraint — attacker can pass an account owned by any program.
SW003critical
Arbitrary CPI target
CPI calls via invoke, invoke_signed, or invoke_unchecked without prior program ID validation — allows substitution of a malicious program.
SW008high
Missing post-CPI reload
Account data read after a CPI call without reload() — program operates on stale state that may have been modified by the called program.
SW011high
AccountInfo as data account
Data-account fields declared as AccountInfo<'info> instead of Account<'info, T> — bypasses Anchor's owner and discriminator validation.
SW012high
Missing seeds + bump on PDA
PDA-like account constraints missing both seeds and bump components — proper PDA derivation requires both tied to trusted inputs.
SW016medium
init_if_needed usage
Anchor account fields using init_if_needed — pattern can permit unintended re-initialization or state reset.
SW018medium
Missing realloc::zero = true
Account reallocation without realloc::zero = true — reallocated memory may contain stale data readable by the program or attackers.
SW020critical
AccountInfo as CPI target
CPI target program typed as AccountInfo<'info> instead of Program<'info, T> — skips program ID validation, allowing any program substitution.
SW001critical
Missing signer check
AccountInfo or UncheckedAccount fields with authority-role names lacking signer constraints — allows attackers to pass unsigned accounts as authorities.
SW002critical
Missing owner check
AccountInfo or UncheckedAccount fields with no owner or address constraint — attacker can pass an account owned by any program.
SW003critical
Arbitrary CPI target
CPI calls via invoke, invoke_signed, or invoke_unchecked without prior program ID validation — allows substitution of a malicious program.
SW008high
Missing post-CPI reload
Account data read after a CPI call without reload() — program operates on stale state that may have been modified by the called program.
SW011high
AccountInfo as data account
Data-account fields declared as AccountInfo<'info> instead of Account<'info, T> — bypasses Anchor's owner and discriminator validation.
SW012high
Missing seeds + bump on PDA
PDA-like account constraints missing both seeds and bump components — proper PDA derivation requires both tied to trusted inputs.
SW016medium
init_if_needed usage
Anchor account fields using init_if_needed — pattern can permit unintended re-initialization or state reset.
SW018medium
Missing realloc::zero = true
Account reallocation without realloc::zero = true — reallocated memory may contain stale data readable by the program or attackers.
SW020critical
AccountInfo as CPI target
CPI target program typed as AccountInfo<'info> instead of Program<'info, T> — skips program ID validation, allowing any program substitution.
SW001critical
Missing signer check
AccountInfo or UncheckedAccount fields with authority-role names lacking signer constraints — allows attackers to pass unsigned accounts as authorities.
SW002critical
Missing owner check
AccountInfo or UncheckedAccount fields with no owner or address constraint — attacker can pass an account owned by any program.
SW003critical
Arbitrary CPI target
CPI calls via invoke, invoke_signed, or invoke_unchecked without prior program ID validation — allows substitution of a malicious program.
SW008high
Missing post-CPI reload
Account data read after a CPI call without reload() — program operates on stale state that may have been modified by the called program.
SW011high
AccountInfo as data account
Data-account fields declared as AccountInfo<'info> instead of Account<'info, T> — bypasses Anchor's owner and discriminator validation.
SW012high
Missing seeds + bump on PDA
PDA-like account constraints missing both seeds and bump components — proper PDA derivation requires both tied to trusted inputs.
SW016medium
init_if_needed usage
Anchor account fields using init_if_needed — pattern can permit unintended re-initialization or state reset.
SW018medium
Missing realloc::zero = true
Account reallocation without realloc::zero = true — reallocated memory may contain stale data readable by the program or attackers.
SW020critical
AccountInfo as CPI target
CPI target program typed as AccountInfo<'info> instead of Program<'info, T> — skips program ID validation, allowing any program substitution.