V4-03LowAcceptedSigning & execution
Called programs can be upgraded between approval and execution
Members approve a call to a program; if that program is upgradeable, different code may run at execution.
Why this is a risk, not a vulnerability · Documented behavior
Members chose to call an upgradeable program; trusting its upgrade authority is part of that choice. The Squads program executes exactly what was approved. What is a vulnerability
- Program
- Squads V4
- Source
- Neodyme ND-SQD1-L2
- Code
- View at dcac867
Nothing between approval and execution checks that a target program is unchanged. Many Solana programs keep a live upgrade authority, so members can approve a call to program X and later execute a call to a different version of X. Neodyme proposed comparing the program’s last-deployed slot with the proposal’s creation slot; this was declined on usability grounds.
What to do
- Before executing, check whether each called program has an upgrade authority and when it was last deployed.
- Be cautious executing an old approval against an upgradeable program.
- Integrators: warn when a callee was redeployed after the proposal was created.