Skip to content
Access control Audit finding Intermediate

Admin is a single-point of failure without any mitigations

The admin role in the Swivel, Marketplace, and VaultTracker contracts has absolute power with no ability to transfer or renounce it. If the admin key is lost or compromised, there is no way to recover or change control, making it a single point of failure.

0xRajeev Follow

Originally disclosed on Code4rena

Submitted by 0xRajeev, also found by 0xsanson and leastwood.

Impact

Admin role has absolute power across Swivel, Marketplace and VaultTracker contracts with several onlyOwner functions. There is no ability to change admin to a new address or renounce it which is helpful for lost/compromised admin keys or to delegate control to a different governance/DAO address in future.

The project does not use the widely used OpenZeppelin Ownable library which provides transfer/renounce functions to mitigate such compromised/accidental situations with admin keys. This makes admin role/key a single-point of failure.

Proof of Concept

Tools Used

Manual Analysis

Recommended Mitigation Steps

Ensure admins are reasonably redundant/independent (3/7 or 5/9) multisigs and add transfer/renounce functionality for admin. Consider using OpenZeppelin’s Ownable library.

JTraversa (Swivel) acknowledged:

Similar to some other suggestions, i’m personally not sure if this is within the scope of the competition / an “issue”. We have immediate plans to add admin transfer functionality however left it out of the scope of this audit as not having a transferAdmin function doesn’t seem to be any more dangerous than the admin having the functionality it currently has.

That said, in production the admin will both be a multisig and there is also basic admin timelock/transfer functionality, with on-chain governance as opposed to centralized-ish multisigs coming Q1.

The original report as published on Code4rena, by 0xRajeev. 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 contracts use a custom admin role without transfer or renounce functions, unlike the standard Ownable pattern.

Impact

If the admin key is lost or compromised, the attacker or nobody can control the contracts, potentially leading to loss of funds or locked contracts.

What the attacker needed

Admin key is lost or compromised

The fix

The admin should be a multisig and the contracts should include transfer and renounce functions, for example by using OpenZeppelin's Ownable library.

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.

In many smart contracts, a special account called the admin or owner can do powerful things. This report says that if that account's key is lost or stolen, there is no way to give the admin role to someone else, so the whole system could be stuck or taken over. The fix is to add a way to transfer or renounce the admin role.

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 0xRajeev

View all

61 more disclosed reports, best first.

More from Swivel v3 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.