08 / Security lab
Attacked on purpose.
Stateful fuzzing, invariants and adversarial operations against the compiled programs, plus the tests behind each attack category.
Not audited. This report lists automated tests and their results. It is not an audit, and passing it does not mean the programs are free of vulnerabilities. Meteora Hooks has not had an external audit. Mainnet hook-router activation is pending.
01
Stateful fuzzing
token-wrapper + token-hooksSeed
1
Runs × steps
8 × 40
Operations executed
320
Succeeded / refused
161 / 159
Invariant violations
none in this run
Coverage
| wrap | 97 |
| unwrap | 84 |
| transfer | 63 |
| attack:unwrap-victim | 12 |
| verify_reserves | 12 |
| attack:direct-execute | 11 |
| attack:wrap-from-victim | 10 |
| attack:direct-mint | 9 |
| attack:foreign-policy | 9 |
| attack:transfer-no-hook | 8 |
| attack:fake-vault | 5 |
Invariants checked after every step
- reserves-cover-supply
- fee-free-underlying-is-exactly-backed
- wrapped-balances-sum-to-supply
- underlying-conserved
- wrapper-totals-match-supply
- failed-operations-change-nothing
- attacks-fail
- honest-operations-behave-as-specified
A failing sequence is shrunk to a minimal reproduction. The test suite also forges unbacked supply to prove the reserve invariant catches it.
Provenance: commit 9327d8e, generated 2026-10-20
Commit
9327d8e27103
Generated
2026-10-20T18:16:26.335Z
Runtime
LiteSVM (node, litesvm 1.6.1) with the compiled .so files
token_hooks.so sha256
969dd56de202ba3e740f6b6aa6875d43406aee7679c4b2522266b49d196b7e36
token_wrapper.so sha256
d37cdbe6acab5c349bbc42ece5b86fe37219cb73fd69d8ec2a2bfde7f401c067
anti_jit_hook.so sha256
ee6c37e94d71f2b8ebe153607ee1b0b2ee5b914e1d982b585184db56236b506d
pnpm --filter @pump-hooks/web export-data (fuzz seed 1, 8 runs × 40 steps)
02
Adversarial operations
each must fail and change nothing| wrap-from-victim | wrap signed by the attacker, debiting the victim's underlying account |
| unwrap-victim | unwrap signed by the attacker, burning the victim's wrapped tokens |
| fake-vault | wrap that names the attacker's own token account as the vault |
| direct-mint | Token-2022 mint_to on the wrapped mint signed by the attacker |
| direct-execute | token-hooks execute called directly, outside a Token-2022 transfer |
| foreign-policy | unwrap that passes another mint's policy account to the hook check |
| transfer-no-hook | wrapped transfer_checked without the hook's extra accounts |
03
Attack categories
15 categories014 tests
Missing or forged signer
An instruction acts for an account whose owner did not sign.
024 tests
Wrong authority
A signer that is not the configured authority changes state it does not control.
035 tests
Account substitution
A caller passes a look-alike account (vault, pool, policy, token account) in place of the bound one.
042 tests
Forged hook invocation
A hook is called outside the operation it guards, to consume limits or fake approvals.
052 tests
Reentrancy and self-CPI
A hook or executed instruction calls back into the engine mid-operation.
063 tests
Hook access to user assets
A hook moves tokens or lamports that belong to the user.
074 tests
Unbacked minting
Wrapped or receipt tokens are created without the matching deposit.
084 tests
Unauthorized withdrawal / trapped funds
Custodied funds leave without the owner, or policies trap them.
093 tests
Mandatory policy removal or reset
An authority removes or weakens a mandatory entry, or resets its state, without the delay.
103 tests
Hook binary substitution
A hook program is upgraded after install and keeps running with new code.
Gap: Upgradeable hooks that are not pinned run whatever is deployed; the registry records the upgrade authority so clients can show it.
113 tests
Replay and stale state
A signed intent, proposal or session is reused after it should expire.
124 tests
Slippage, sandwich and price manipulation
A trade settles at a manipulated price or worse than the user's bound.
Gap: Router hooks are bypassable: the same pool remains callable directly (see max_size_caps_buys_and_venue_stays_directly_callable).
133 tests
Fee and transfer-fee accounting
Fees are charged above bounds, or nominal amounts are trusted instead of measured deltas.
144 tests
Initialization front-running and registry poisoning
Someone initializes a program first, squats a slug, or installs a version that does not match its claims.
156 tests
Fail-open, partial execution and compute exhaustion
An error path allows the operation, a failed transaction leaves partial state, or a stack exceeds compute.
04
Run it yourself
scripts/build_programs.sh pumphooks security-check --runs 8 --out security-report.md pumphooks security-check --stack <hex> # plus diagnostics for your own stack