Qevra logo

Solana program audits where the attacker chooses every account.

Solana is not a dialect of the same thing. Programs are handed the accounts a transaction names, and the runtime authenticates almost none of them. The dominant critical finding here is not reentrancy or arithmetic — it is a validation the program was supposed to perform and did not.

Browse Solana projects in Aegis

Seven checks the runtime will not do for you.

On the EVM, storage belongs to the contract and the caller's identity arrives authenticated. Neither holds here. A Solana review walks every instruction against this matrix, because a single omitted check is usually the whole finding.

How invariants are established during a review
  1. Owner

    The question
    Is this account owned by the program that should own it?
    If it is missing
    An attacker passes a look-alike account they created and control, with every field set to whatever suits them. The program reads it as trusted state.
    What we check
    Owner asserted before any deserialised data is used. Anchor's typed accounts do this; a raw AccountInfo does not, and mixing the two is where it slips.
  2. Signer

    The question
    Did the authority actually sign this transaction?
    If it is missing
    Any address can be presented as the authority, and every instruction gated on that authority becomes permissionless.
    What we check
    is_signer asserted on each authority account, and Signer used in place of an unchecked account wherever a signature is the control.
  3. Identity

    The question
    Is this the specific account expected, not merely the right type?
    If it is missing
    Right type, wrong instance: an attacker supplies their own correctly-shaped account and the program operates on it against somebody else's position.
    What we check
    Expected account bound explicitly by address or PDA constraints, stored-key comparisons, or has_one relationships. Discriminators provide supplemental type and layout validation; they do not prove account identity.
  4. PDA seeds

    The question
    Is this address the canonical derivation for these seeds?
    If it is missing
    A non-canonical bump yields a second valid address for the same logical seeds, so an attacker can stand up a parallel account the program treats as official.
    What we check
    Canonical bump stored and re-derived rather than accepted from input, and seeds containing everything that must be unique per account.
  5. Closing

    The question
    Was this account actually closed, or just emptied?
    If it is missing
    An account drained of lamports but left intact can be refunded within the same transaction and reused, with its stale data still readable as current.
    What we check
    Closure zeroes the data, reassigns ownership, and drains the lamports, with nothing reading the account afterwards in the same instruction.
  6. CPI target

    The question
    Which program is this instruction actually invoking?
    If it is missing
    An attacker supplies a program id of their own and the program hands its signing authority to arbitrary code it never intended to call.
    What we check
    Program ids compared against pinned constants before invocation, and signer seeds passed only where the callee is fixed.
  7. Compute

    The question
    Does this instruction finish inside the compute budget?
    If it is missing
    Iteration over a collection users can grow eventually makes the instruction unexecutable — and the paths that stop working are usually close, liquidate, and withdraw.
    What we check
    Bounded or paginated processing, with worst-case compute measured against a full account rather than a test fixture.

The framework gap

Anchor performs several of these checks automatically, which is exactly why the gaps are easy to miss: a codebase that looks uniformly safe often has one instruction using an unchecked account because a constraint could not express what it needed. The interesting review question is not whether a framework is used, but where somebody had to step outside it.

A mint can behave in ways your integration never anticipated.

Classic SPL tokens behave uniformly enough that teams reason about them as a single thing. Token-2022 makes behaviour a per-mint decision through extensions, and the ones that matter most are invisible from a balance query.

  • Transfer hooks

    A transfer invokes another program mid-flight. Anything that assumed a transfer was inert now has arbitrary code running inside it.

  • Transfer fees

    Less arrives than was sent. Credit the requested amount and the shortfall lands on you, on every single transfer.

  • Permanent delegate

    An authority that can move or burn any holder's tokens indefinitely. Custody assumptions built on possession stop being true.

  • Freeze authority

    Accounts can be frozen after the fact, so a withdrawal path that always worked in testing can revert permanently in production.

  • Default account state

    New accounts can arrive frozen, which turns onboarding into a support problem rather than a transfer.

  • Retained mint authority

    Supply can still grow after you integrate. Any accounting anchored to a supply figure read once is anchored to nothing.

  • Interest-bearing mints

    Displayed balances change with no transfer at all, so a figure snapshotted at deposit is wrong by withdrawal.

  • Wrong mint, right shape

    A token account of exactly the correct type, holding a different mint. Type checks pass and the value moved is not the value you meant.

The SPL assumption gap

Code written against classic SPL Token assumes a fixed set of behaviours that Token-2022 turned into per-mint options. The reliable pattern is the same one that works for hostile ERC-20s: enumerate the extensions present on the mint rather than assuming the defaults, and measure the balance delta you actually received instead of trusting the amount you asked for.

A deployed program is only as immutable as its upgrade authority.

Solana programs are replaceable by default, which makes upgrade authority the equivalent of a proxy admin — and the single most consequential thing a review can find still sitting on one person's key.

We check the program as deployed

Per instruction, against the validation matrix.

  • Every account an instruction accepts, and which of the seven checks it actually performs on each.
  • PDA seeds and bump handling wherever a derived address carries authority.
  • Cross-program invocations, their pinned targets, and what signing authority travels with them.
  • Token account and mint relationships, including which extensions the mints in scope carry.

We flag authority that outlives the review

The parts teams most often forget they still hold.

  • The program's upgrade authority: who holds it, and whether the deployed code can simply be replaced tomorrow.
  • Multisig or squad configuration behind that authority, and whether the threshold matches the stated policy.
  • Admin instructions reachable by a single key, and freeze or delegate powers retained on your own mints.
  • Instructions that step outside the framework's constraints, and why somebody needed to.

We are not reviewing the network

The boundary, stated rather than implied.

  • We review programs that run on Solana, not the validator client, the runtime, or consensus beneath them.
  • Findings describe the program at a named deployment; an upgrade authority makes that a statement about today.
  • Client and SDK code that builds transactions is only in scope when named explicitly.
  • Programs you compose with are not covered by a review of yours, however tightly coupled they are.

Bring the program and the instructions you trust least.

Scoping starts with the program id, the instruction set, and which accounts each one accepts. If part of the codebase had to step outside the framework's constraints, that is usually the right place to begin.

Every chain is reviewed on the same method. See how a smart contract audit runs.