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

setGuardian() Privilage Escalation Causing Governance Lose Control of The Contract #31

Closed
code423n4 opened this issue Nov 16, 2021 · 2 comments
Labels
3 (High Risk) bug Something isn't working duplicate This issue or pull request already exists sponsor confirmed

Comments

@code423n4
Copy link
Contributor

Handle

Meta0xNull

Vulnerability details

Impact

governance = _guardian

The Guardian will become Governance of the Contract which is Not Expected. Original Governance will lose control of this contract if they call setGuardian() with Address/Key beyong their control.

Proof of Concept

https://github.com/Badger-Finance/badger-ibbtc-utility-zaps/blob/6f700995129182fec81b772f97abab9977b46026/contracts/IbbtcVaultZap.sol#L116-L119
https://github.com/Badger-Finance/badger-ibbtc-utility-zaps/blob/a5c71b72222d84b6414ca0339ed1761dc79fe56e/contracts/SettToRenIbbtcZap.sol#L130-L133

Tools Used

Manual Review

Recommended Mitigation Steps

Before:
governance = _guardian;

After:
guardian = _guardian;

@code423n4 code423n4 added 3 (High Risk) bug Something isn't working labels Nov 16, 2021
code423n4 added a commit that referenced this issue Nov 16, 2021
@shuklaayush shuklaayush added duplicate This issue or pull request already exists sponsor confirmed labels Nov 16, 2021
@GalloDaSballo
Copy link
Collaborator

Agree with the finding, we fixed it before deployment

@0xleastwood
Copy link
Collaborator

duplicate of #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) bug Something isn't working duplicate This issue or pull request already exists sponsor confirmed
Projects
None yet
Development

No branches or pull requests

4 participants