Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone can create Proposal Unigov Proposal-Store.sol #26

Open
code423n4 opened this issue Jun 17, 2022 · 1 comment
Open

Anyone can create Proposal Unigov Proposal-Store.sol #26

code423n4 opened this issue Jun 17, 2022 · 1 comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/Plex-Engineer/manifest/blob/688e9b4e7835854c22ef44b045d6d226b784b4b8/contracts/Proposal-Store.sol#L46
https://github.com/Plex-Engineer/lending-market/blob/b93e2867a64b420ce6ce317f01c7834a7b6b17ca/contracts/Governance/GovernorBravoDelegate.sol#L37

Vulnerability details

Impact

Proposal Store is used to store proposals that have already passed (https://code4rena.com/contests/2022-06-new-blockchain-contest#unigov-module-615-sloc) " Upon a proposal’s passing, the proposalHandler either deploys the ProposalStore contract (if it is not already deployed) or appends the proposal into the ProposalStore’s mapping ( uint ⇒ Proposal)"

But anyone can add proposals to the contract directly via AddProposal() function.

Unigov proposals can be queued and executed by anyone in GovernorBravoDelegate contract
https://github.com/Plex-Engineer/lending-market/blob/b93e2867a64b420ce6ce317f01c7834a7b6b17ca/contracts/Governance/GovernorBravoDelegate.sol#L37

Proof of Concept

https://github.com/Plex-Engineer/manifest/blob/688e9b4e7835854c22ef44b045d6d226b784b4b8/contracts/Proposal-Store.sol#L46

Recommended Mitigation Steps

Authorization checks for AddProposal, only governance module should be able to update

@GalloDaSballo
Copy link
Collaborator

The warden has shown how, due to a lack of checks, anyone can create, queue, and execute a proposal without any particular checks.

Because governance normally is limited via:

  • Voting on a proposal
  • Access control to limit transactions

And the finding shows how this is completely ignored;

I believe High Severity to be appropriate

@JeeberC4 JeeberC4 added the duplicate This issue or pull request already exists label Aug 12, 2022
@GalloDaSballo GalloDaSballo reopened this Aug 15, 2022
@GalloDaSballo GalloDaSballo removed the duplicate This issue or pull request already exists label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

4 participants