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

Admin can steal funds from vesters on AuraVestedEscrow #283

Closed
code423n4 opened this issue May 25, 2022 · 3 comments
Closed

Admin can steal funds from vesters on AuraVestedEscrow #283

code423n4 opened this issue May 25, 2022 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraVestedEscrow.sol#L77
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraVestedEscrow.sol#L186

Vulnerability details

Impact

Admin can steal funds from vesters on AuraVestedEscrow

Proof of Concept

By changing the address of the aura locker the admin can use the external call with funds approval to steal funds when claim() is called.
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraVestedEscrow.sol#L77

https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraVestedEscrow.sol#L186
If a malicious contract is introduced instead of aura locker the admin can steal funds from the claim since there is an external call with approval.

Recommended Mitigation Steps

Make the locker address immutable to improve the trustlessness of the protocol.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels May 25, 2022
code423n4 added a commit that referenced this issue May 25, 2022
@0xMaharishi 0xMaharishi added invalid This doesn't seem right sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue labels May 28, 2022
@0xMaharishi
Copy link

a) locker address may change in the future. b) claimers can choose whether to lock or not. c) admin has control to cancel the vesting stream so they already have write access

@dmvt
Copy link
Collaborator

dmvt commented Jun 22, 2022

I am downgrading this to QA. The report assumes that the admin is a bad actor. If the admin is a bad actor, there are many ways that they can rug the users. This is a given in any permissioned protocol. Removing admin functionality decreases the function and utility of the protocol and ultimately has a greater harm on the users. Admin functionality existing is not a medium risk issue, but a low risk one given the likelihood of the compromise occurring.

@dmvt dmvt added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed invalid This doesn't seem right 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jun 22, 2022
@dmvt dmvt added the duplicate This issue or pull request already exists label Jul 8, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jul 8, 2022

Grouping this with the warden’s QA report, #282

@dmvt dmvt closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

3 participants