Skip to content
Access control Audit finding Intermediate

manager.allowedVaults check missing for add/remove strategy

The addStrategy and removeStrategy functions in the Controller contract lack the manager.allowedVaults check that is present in reorderStrategies. This allows a strategist to add or remove strategies on vaults that are not authorised, potentially causing harm.

0xRajeev Follow

Originally disclosed on Code4rena

Submitted by 0xRajeev

Impact

The manager.allowedVaults check is missing for add/remove strategy like how it is used in reorderStrategies(). This will allow a strategist to accidentally/maliciously add/remove strategies on unauthorized vaults.

Given the critical access control that is missing on vaults here, this is classified as medium severity.

Proof of Concept

Tools Used

Manual Analysis

Recommended Mitigation Steps

Add manager.allowedVaults check in addStrategy() and removeStrategy()

GainsGoblin (yAxis) acknowledged

Haz077 (yAxis) confirmed

uN2RVw5q commented:

Implemented in https://github.com/code-423n4/2021-09-yaxis/pull/36

GalloDaSballo (judge) commented:

Sponsor has acknowledged and mitigated by adding further access control checks

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

Impact

A strategist could accidentally or maliciously add or remove strategies on unauthorised vaults, which may disrupt vault operations or lead to loss of funds.

What the attacker needed

Strategist role

The fix

The fix was to add the manager.allowedVaults check in addStrategy() and removeStrategy(), as implemented in a pull request.

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 smart contract has different roles, like a manager and a strategist. The manager decides which vaults (storage places for funds) are allowed. The strategist can add or remove strategies (ways to invest funds) but should only do so on allowed vaults. Because a check was missing, the strategist could accidentally or on purpose change strategies on vaults that the manager did not approve.

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 yAxis 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.