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 is overprivileged #133

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

admin is overprivileged #133

code423n4 opened this issue May 27, 2022 · 3 comments
Labels
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 duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-rubicon/blob/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/rubiconPools/BathToken.sol#L245

Vulnerability details

Impact

Compromised admin can drain underlyingToken from BathToken.sol.

Proof of Concept

  • Compromised admin calls setMarket and sets RubiconMarketAddress to malicious address.
  • Compromised admin calls approveMarket.
  • Now attacker in charge of the new malicious RubiconMarketAddress can reallocate funds from BathToken.sol to wherever he wants.

Tools Used

Manual Review

Recommended Mitigation Steps

Consider implementing timelock constraints on functions with onlyAdmin modifiers.

Examples of similar issues ranked as high can be found here (issues H-07, H-09, H-10).

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels May 27, 2022
code423n4 added a commit that referenced this issue May 27, 2022
@bghughes bghughes added duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels Jun 3, 2022
@bghughes
Copy link
Collaborator

bghughes commented Jun 3, 2022

Acknowledged risk in the centralized system: #43 #133 #344

@HickupHH3
Copy link
Collaborator

Duplicate of #249

@HickupHH3 HickupHH3 marked this as a duplicate of #249 Jun 18, 2022
@HickupHH3 HickupHH3 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value and removed 3 (High Risk) Assets can be stolen/lost/compromised directly labels Jun 18, 2022
@HickupHH3
Copy link
Collaborator

While the mitigation was generic, the user did point to specific functions and explained the admin rug vector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants