VeloGovernor : proposalNumerator and team are updated by team, not governance
The VeloGovernor contract's setProposalNumerator and setTeam functions could only be called by the team address, not by governance. This meant the team, rather than the governance process, controlled these settings.
Submitted by cccz
setProposalNumerator and setTeam functions of the VeloGovernor contract can only be called by team without allowing governance to call.
Proof of Concept
Recommended Mitigation Steps
Allow governance to call setProposalNumerator and setTeam functions.
pooltypes (Velodrome) acknowledged
Alex the Entreprenerd (judge) commented:
I really dislike how the finding is phrased as the variable
teamdoesn’t mean much by itself.That said the finding has validity in that the Governance Contract should be calling to change the
proposalNumeratorso a check should probably be foraddress(this).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the access check on these setters only allowed the team address and did not include the governance contract itself (for example via address(this)).
What the attacker needed
Access to the team address
The fix
The setters should be changed so the governance contract can call them, for example by checking for address(this).
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A governance contract is meant to let token holders vote on changes. Here, two settings could only be changed by a special team address, so the community vote had no say over them. That gives the team power the design probably did not intend.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.