Skip to content
Access control Audit finding Beginner

Attacker can revoke any user from a market

The delegation version of the revokeLender function lacks access control, allowing any user to revoke any participant from a market. An attacker could revoke any address from any market, making the market unusable.

PeterSR Follow with hash

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-11-teller-finance-update-judging/issues/37

Found by

PeterSR, hash

Summary

Lack of access control in revokeLender allows an attacker to revoke any participant from a market

Root Cause

The delegation version of the revokeLender function fails to perform any access control checks allowing any user to revoke any user

Solidity
    function _revokeStakeholderViaDelegation(
        uint256 _marketId,
        address _stakeholderAddress,
        bool _isLender,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) internal {
        bytes32 uuid = _revokeStakeholderVerification(
            _marketId,
            _stakeholderAddress,
            _isLender
        );
        // NOTE: Disabling the call to revoke the attestation on EAS contracts
        //        address attestor = markets[_marketId].owner;
        //        tellerAS.revokeByDelegation(uuid, attestor, _v, _r, _s);
    }

Internal pre-conditions

Attestation should be enabled to observe the impact

External pre-conditions

No response

Attack Path

  1. Attacker calls revokeLender by passing in any address they wish to revoke from the market

Impact

Attacker can revoke any address they wish from any market making the market unuseable

PoC

No response

Mitigation

Perform access control checks

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/teller-protocol/teller-protocol-v2-audit-2024/pull/77

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

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 delegation version of the revokeLender function fails to perform any access control checks, allowing any user to revoke any user.

Impact

An attacker could revoke any address from any market, making the market unusable.

What the attacker needed

Attestation enabled to observe impact

The fix

The protocol team fixed this issue by adding access control checks.

How it was found

  1. Attacker calls revokeLender with any address they wish to revoke from the market.

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 a smart contract, some functions should only be callable by certain people, like the owner. Here, a function meant to let someone revoke a lender (remove them from a market) had no check on who was calling it. So anyone could call it and remove any lender, disrupting the market.

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 from Teller Lender Groups Update Audit

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.