An eval that tests whether frontier AI models can identify subtle security vulnerabilities in Solana programs, specifically around CPI, signer checks, PDA validation, and account ownership.
Most LLMs were trained primarily on EVM/Solidity patterns. Solana's account model, PDA derivation, CPI signer propagation, and Anchor constraints create a distinct vulnerability surface that models consistently miss.
Each task consists of:
- A vulnerable Solana program (Anchor) based on real-world vulnerability patterns
- A description of the program's intended behavior and the vulnerability
- A question asking the model to identify the vulnerability
- A grader that checks if the model correctly identified the issue
- Task 1: Missing signer check on admin instruction
- Task 2: PDA seed collision (missing bump)
- Task 3: Unchecked account ownership in CPI
- Task 4: Reentrancy via CPI to untrusted program
- Task 5: Missing has_one constraint on authority
- Task 6: Token account mint mismatch
- Task 7: Missing rent exemption check
- Task 8: Unsafe deserialization (unchecked account data)
- Task 9: Signer privilege escalation via invoke_signed
- Task 10: Account confusion (wrong account passed as authority)
Compile + run exploit test. Model answer must identify:
- Vulnerability type
- Location (file:line or function name)
- Exploit scenario
- Fix
Usage:
# Grade single task
python grader/grader.py task1 response.txt
# Grade all tasks
python grader/grader.py --all responses/Free/low-cost models on OpenRouter for development. Frontier models for final eval (GPT-4, Claude, etc.)
Each task is based on real vulnerability classes found in Solana security audits and Immunefi bounties. Vulnerabilities mirror bugs found in protocols like Mango Markets, Wormhole, Parity, and various Solana DeFi protocols.
MIT