Skip to content
Access control Audit finding Intermediate

Gibber can take any amount from safes

The Gibber role can withdraw any amount from a TurboSafe without restriction, allowing a privileged user to remove all funds. An attacker with this role could drain a safe unconditionally.

gzeon Follow

Originally disclosed on Code4rena

Submitted by gzeon

Although Gibber is supposed to behind governance timelock, there are still significant “rug risk” when such privillaged user can remove all fund from a vault unconditionally.

Proof of Concept

TurboSafe.sol#L335

function gib(address to, uint256 assetAmount) external nonReentrant requiresLocalOrMasterAuth {
    emit SafeGibbed(msg.sender, to, assetAmount);

    // Withdraw the specified amount of assets from the Turbo Fuse Pool.
    require(assetTurboCToken.redeemUnderlying(assetAmount) == 0, "REDEEM_FAILED");

    // Transfer the assets to the authorized caller.
    asset.safeTransfer(to, assetAmount);
}

Recommended Mitigation Steps

Limit gib to certain collateral ratio.

Joeysantoro (Tribe Turbo) disputed and commented:

This is intended behavior. There will be an extended immutable timelock behind the gibber, so Turbo users will have notice to less and withdraw. The only scenario where they can’t is when the boosted strategy is insolvent, which is intended behavior.

Alex the Entreprenerd (judge) commented:

While there’s something to be appreciated about a simple architecture, I believe that the flexibility of the Fuse Pool would allow to account for insolvency in a trustless way through the Fuse Liquidation code.

Additionally, while the code may be put behind timelock, we can only review the code that is in scope and that we can prove behaves in a certain way.

In this case, the warden has identified that the system admin can move funds at any time, without limitation.

Because this type of exploit is contingent on a malicious admin, I believe Medium Severity to be appropriate.

The sponsor intends on using an immutable timelock so for end users of the protocol I highly recommend to verify that statement.


The original report as published on Code4rena, by gzeon. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

The gib function lacks a check on the collateral ratio, allowing unlimited withdrawal by an authorised caller.

Impact

A malicious or compromised Gibber could remove all funds from a safe, though the sponsor states an immutable timelock gives users notice.

What the attacker needed

Gibber role access

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.

A privileged role called Gibber is supposed to be limited, but the code lets it take any amount from a safe. If that role is compromised or malicious, all funds can be stolen.

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.

More by gzeon

View all

46 more disclosed reports, best first.

More from Tribe Turbo contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.