Skip to content

Security Audit: 2 Critical, 2 High, 3 Medium Vulnerabilities Found#57

Open
Pyiner wants to merge 1 commit intoBonfida:masterfrom
Pyiner:security-audit-findings
Open

Security Audit: 2 Critical, 2 High, 3 Medium Vulnerabilities Found#57
Pyiner wants to merge 1 commit intoBonfida:masterfrom
Pyiner:security-audit-findings

Conversation

@Pyiner
Copy link
Copy Markdown

@Pyiner Pyiner commented Mar 28, 2026

Security Audit Report — Bonfida Token Vesting Program

Automated security analysis of the token-vesting program, identifying 7 actionable vulnerabilities across the program's instruction handlers.

Critical Findings (2)

  • V-01: Missing owner check on vesting_account in process_unlock — PDA key is validated but vesting_account.owner == program_id is never checked (unlike process_create which does)
  • V-02: Same missing owner check in process_change_destination — enables destination redirection

High Findings (2)

  • V-03: mint_address stored during creation is never validated during unlock
  • V-04: Integer overflow in process_unlock amount accumulation (uses += instead of checked_add, inconsistent with process_create)

Medium Findings (3)

  • V-05: Missing SPL Token program ID validation in process_create (checked in unlock, not in create)
  • V-06: No validation of new destination token account mint in change_destination
  • V-07: Missing payer signer check and system program validation in process_init

Each finding includes:

  • Detailed description and affected code location
  • Impact analysis
  • Proof of concept / reproduction steps
  • Proposed code fix

Full report: see SECURITY_AUDIT.md


Audit performed by Gary AI Agent (autonomous security researcher)

Identified missing owner checks in process_unlock and process_change_destination,
integer overflow in unlock amount calculation, and missing mint validation.
Each finding includes proof of concept and proposed fix.

Co-Authored-By: Gary AI Agent <noreply@garybot.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant