Index of every page on this site: llms.txt
All skills
princedotrs avatar

/solana-program-audit

@586e19e
Run it yourself

Security audit of Solana on-chain programs in Rust: Anchor, native solana-program and Pinocchio. Use to audit or review a Solana program, PR or fix and to find vulnerabilities: missing signer or owner checks, account validation, type cosplay, reinitialization, init front-running, closed-account revival, duplicate accounts, PDA seeds and bumps, arbitrary CPI, CPI return data, remaining_accounts, sysvar and instruction introspection, overflow, rounding, Token-2022 extensions and transfer hooks, oracle, flash-loan and MEV attacks, upgrade authority and governance. Covers DeFi reviews (AMM, lending, perps, staking, bridges, launchpads), PoC exploits, fix patches, re-audits, spec compliance, audit readiness, release gates and audit reports. Trigger on code using anchor_lang, solana_program, pinocchio, #[program], #[derive(Accounts)] or entrypoint!. Not for writing features, off-chain clients or backends, EVM/Solidity, or incident response.

  • 237 files
  • 2 MB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/princedotrs/solana-audit/solana-program-audit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexploit-history.md

≈1.6k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Exploit & disclosure history (normalised by first security boundary crossed)

Classify by the earliest failed boundary, not the final consequence. A public analog supports a class label and severity band only (Rule 5b). Prefer primary write-ups; many 2021–22 links have rotted (archive.org fallbacks noted).

Incident / disclosure Year First boundary Mechanic (our summary) Maps to Link
Wormhole bridge (~$326M) 2022 sysvar identity verify_signatures read the Instructions sysvar via deprecated unchecked load_instruction_at; forged SignatureSet → VAA → mint; the fix was merged upstream but not deployed KV-101, KV-137 https://research.kudelskisecurity.com/2022/02/03/quick-analysis-of-the-wormhole-attack/
Cashio (~$52M) 2022 account validation collateral/mint validation chain with no trusted root KV-146, KV-016 PoC: https://github.com/PwnedNoMore/cashio-exploit-workshop/tree/poc
Solend malicious lending market 2021 authority anchoring reserve config changed through an attacker-owned market (exact missing check reconstructed) KV-146 https://hackmd.io/54qwl3oeT4CYuREUgxQ2zQ
SPL token-lending rounding (Neodyme) 2021 arithmetic round-half-up conversions → n+1 per round trip; upstream fix: floor (SPL PR #1883, merged 2021-12-04); Solend, Tulip and Larix patched; Port was not vulnerable (it had already applied part of the draft fix) AR-071, KV-012 https://neodyme.io/blog/lending_disclosure
Jet Protocol v1 withdraw_tokens (whitehat) 2021–22 access control public inner instruction signed by a market PDA over caller-chosen accounts KV-149 SlowMist best-practices repo
Jet break on empty slot 2021–22 state machine loop stops at the first empty slot SM-068 archive copy of https://medium.com/@0xjayne
Candy Machine v1 reinit 2022 initialization live machines re-initialised (2022-01-04); the attacker became authority and used the authority-only withdraw to take the lamports (mostly rent) the machine/config accounts held — mint proceeds were not redirected KV-142 https://jonlu.ca/posts/candy-machine
SPL stake-pool init (Sec3) 2021–22 initialization pre-funded reserve unbacked at init (fixed PR #2636) KV-162 https://www.sec3.dev/blog/solana-stake-pool-a-semantic-inconsistency-vulnerability-discovered-by-x-ray
COPE Roulette 2021 settlement atomicity revert-if-lose on same-tx outcome (207/207) KV-178 https://github.com/Arrowana/cope-roulette-pro
OtterSec "$200m Bluff" 2022 oracle design LP valued from live reserves (Apricot, Larix, Port, Tulip, Parrot at risk; no exploit reported) oracles.md §11 https://osec.io/blog/2022-02-16-lp-token-oracle-manipulation
Port max-withdraw PoC 2022 economic logic self-liquidation sequence; the test now asserts failure (regression test) lending.md https://github.com/port-finance/variable-rate-lending/blob/master/token-lending/program/tests/max_withdraw_bug_poc.rs
Royal Flush (Solens) 2022 composition chain of small issues (methodology citation only — primary post not fetched) FULL-AUDIT Step 1.6 archive copy of https://medium.com/@solens_io/schrodingers-nft-an-incinerator-spl-token-program-and-the-royal-flush-attack-58e4ce4e63dc
Token-2022 ND-ANZ-LO-01 (Neodyme for Anza) 2024 token authority CPI Guard bypass via self-delegation (fixed) TK-007 https://www.neodyme.io/reports/Token%202022%20-%202024.pdf
Token-2022 ND-ANZ-IN-01 2024 token lifecycle mint resurrection; accepted design trade-off KV-166 same
Audius Claimable Tokens (Zellic) 2025 signer/introspection SetAuthority trusted a secp256k1 verification not bound to the target token account (Critical); replay across token accounts (Medium); close DoS via dust (Low) KV-102, KV-168 https://reports.zellic.io/publications/claim-and-rewards-programs
Pye solo-validator bonds (Zellic) 2025 state/admin fee admin can front-run deposits/withdrawals (High); fix: user min-out/max-fee + delayed changes KV-172, ECON-102 https://reports.zellic.io/publications/pye/sections/fee-can-be-front-run-on-depositwithdraw-fee-frontrunning
SPL Token Wrap (Zellic) 2025 token authority wrapped-mint freeze semantics integrators may not expect (Medium) T5 https://reports.zellic.io/publications/spl-token-wrap-program/sections/token-wrap-program-token-wrap-wrap
N1 Bridge (Zellic) 2025 token identity arbitrary pubkey used where a mint should be validated (Info) KV-016 https://reports.zellic.io/publications/n1-bridge/findings/informational-bridge-usage-of-pubkey-rather-than-mint
Secured Finance (OtterSec) 2024 token validation attacker-supplied token state passed weak validation KV-016 https://osec.io/blog/2024-05-29-abusing-token-validation-in-secured-finance/
Solend "curious rent thief" (OtterSec) 2022 lifecycle [UNVERIFIED] account created/funded and initialised in separate steps; pre-funded rent captured KV-142 https://osec.io/blog/2022-08-19-solend-rent-thief/
Anchor GHSA-c6rc-8jpp-2fgc / CVE-2026-45137 2026 framework Program<'info, System> accepted any executable (1.0.0 and the RCs with #3878 – 1.0.1; fixed 1.0.2) KV-154, KV-158 https://github.com/otter-sec/anchor/security/advisories
Anchor GHSA-429q-fhh4-r6hj / GHSA-6px8-6mw3-4hx4 2026 framework InterfaceAccount discriminator check disabled in 1.0.0-rc.1 (fixed rc.2; SPL Mint/TokenAccount unaffected); LazyAccount::unload() without owner/discriminator re-check after a CPI (0.31.0–1.1.2, fixed 1.2.0) KV-158 same

Public audit-report corpus: link to the "Audits and Code Reviews" section of https://github.com/sannykim/solsec (≈ 50 reports from Kudelski, Neodyme, OtterSec, Zellic, Sec3, Halborn, Bramah, Quantstamp, MadShield, Opcodes, HashCloak, SlowMist, Certik) rather than copying the list. Public judged contests (calibration): Sherlock (Orderly, WOOFi), Code4rena (Pump Science 2025-01, Solana Foundation Token-2022 Confidential Transfer 2025-08 — Low only, a negative control, Meteora DBC 2025-08), Cantina (several, some gated), CodeHawks First Flights (RustFund 2025-03, SSSwap 2025-05). Names and dates as listed by the source, not re-checked offline; re-verify them and the judged counts before use.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 586e19e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for princedotrs/solana-audit