Skip to content
Access control Write-up Beginner

Betverse

The ICO token contract's transferTokenToLockedAddresses function was mistakenly marked public instead of internal, allowing anyone to call it. An attacker could repeatedly call it to drain the contract's BToken balance into their own timelock address.

mirror.xyz

Published on mirror.xyz

A critical vulnerability was discovered in one of the Testnet projects on the Immunefi Platform, the Betverse ICO Token contract’s transferTokenToLockedAddresses() function. The vulnerability was caused by mistakenly marking this function as public when it should have been an internal function.

The author, on mirror.xyz

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

Attackers could steal BToken from the ICO contract, potentially causing significant financial losses for the contract and its users.

What the attacker needed

Ability to call the public function

The fix

The function should be marked as internal so only authorized contracts can call it.

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 write-up has not been written yet. The Original tab links to the source.

A smart contract function was left open for anyone to call, when it should have been restricted to internal use only. Because of this, an attacker could repeatedly trigger it to move the contract's tokens into a timelock address they control, eventually emptying the contract.

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.

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.