Admin rug vectors
The admin can call functions that overwrite state, set a malicious market, or add unlimited bonus tokens, which could lock user funds or break withdrawals. An attacker with admin access could exploit these to steal new funds or cause denial of service.
Submitted by IllIllI, also found by oyc109, 0x1f8b, xiaoming90, SmartSek, 0xDjango, Dravee, pauliax, rotcivegaf, sashiketh, shenwilly, and StErMi
Impact
There are multiple functions that the admin can call to brick various parts of the system, leading to user’s funds being locked
Even if the owner is benevolent the fact that there is a rug vector available may negatively impact the protocol’s reputation. See this example where a similar finding has been flagged as a high-severity issue. I’ve downgraded these instances to be a medium since it requires cooperation of the admin.
Proof of Concept
Here are some examples:
Overwrite state:
File: contracts/rubiconPools/BathHouse.sol #1
216 /// @notice A migration function that allows the admin to write arbitrarily to tokenToBathToken
217 function adminWriteBathToken(ERC20 overwriteERC20, address newBathToken)
218 external
219 onlyAdmin
220 {
221 tokenToBathToken[address(overwriteERC20)] = newBathToken;
222 emit LogNewBathToken(
223 address(overwriteERC20),
224 newBathToken,
225 address(0),
226 block.timestamp,
227 msg.sender
228 );
229 }
Steal new funds with new malicious market
File: contracts/rubiconPools/BathHouse.sol #2
334 /// @notice Admin-only function to set a Bath Token's target Rubicon Market
335 function setMarket(address newMarket) external onlyAdmin {
336 RubiconMarketAddress = newMarket;
337 }
Add a ton of bonus tokens, making withdrawals break because of unbounded for-loop
File: contracts/rubiconPools/BathToken.sol #3
269 /// @notice Admin-only function to add a bonus token to bonusTokens for pool incentives
270 function setBonusToken(address newBonusERC20) external onlyBathHouse {
271 bonusTokens.push(newBonusERC20);
272 }
Recommended Mitigation Steps
Validate input arguments and require specific upgrade paths for each contract, not just allowing the admin to set whatever they decide, add limit to number of bonus tokens.
bghughes (Rubicon) acknowledged:
Centralization risk is acknowledged.
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 admin has unrestricted ability to set critical addresses and unbounded arrays without validation or limits.
What the attacker needed
Admin privileges
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.
This report is about a smart contract where the person in charge (the admin) has special powers that could be misused. For example, the admin can change where the contract sends money or add so many bonus tokens that withdrawals stop working. If the admin turns bad, they could lock or steal users' funds.
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.