Blacklisted accounts can still transact
The blacklist feature only seizes the blacklisted account's stablecoin balance but does not prevent the account from continuing to send and receive tokens. An attacker could therefore keep transacting with a blacklisted address, making the blacklist effectively useless.
Source: https://github.com/sherlock-audit/2024-02-telcoin-platform-audit-update-judging/issues/4
Found by
0xkmg, Krace, Tendency, ZanyBonzy, ZdravkoHr., blutorque, bughuntoor, cawfree, merlin, neocrao, sa9933, smbv-1923, turvec
Summary
Accounts that have been blacklisted by the BLACKLISTER_ROLE continue to transact normally.
Vulnerability Detail
Currently, the only real effect of blacklisting an account is the seizure of Stablecoin funds:
/**
* @notice Overrides Blacklist function to transfer balance of a blacklisted user to the caller.
* @dev This function is called internally when an account is blacklisted.
* @param user The blacklisted user whose balance will be transferred.
*/
function _onceBlacklisted(address user) internal override {
_transfer(user, _msgSender(), balanceOf(user));
}
However, following a call to addBlackList(address), the blacklisted account may continue to transact using Stablecoin.
Combined with previous audit reports, which attest to the blacklist function's susceptibility to frontrunning, the current implementation of the blacklist operation can effectively be considered a no-op.
Impact
Medium, as this the failure of a manually administered security feature.
Code Snippet
π Stablecoin.sol
Tool used
Manual Review
Recommendation
ERC20s that enforce blacklists normally prevent a sanctioned address from being able to transact:
π Stablecoin.sol
+ error Blacklisted(address account);
+function _update(address from, address to, uint256 value) internal virtual override {
+
+ if (blacklisted(from)) revert Blacklisted(from);
+ if (blacklisted(to)) revert Blacklisted(to);
+
+ super._update(from, to, value);
+}
Discussion
sherlock-admin4
1 comment(s) were left on this issue during the judging contest.
takarez commented:
valid; high(1)
sherlock-admin4
The protocol team fixed this issue in PR/commit https://github.com/telcoin/telcoin-contracts/pull/3.
spacegliderrrr
Fix looks good, blacklisted addresses can no longer send and receive tokens.
sherlock-admin4
The Lead Senior Watson signed off on the fix.
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
The blacklist feature fails to prevent a blacklisted account from transacting, so it can be considered a no-op, though the text rates this as medium severity.
What the attacker needed
Account is blacklisted; blacklisted account initiates a transfer
The fix
The issue was fixed by adding a transfer hook that reverts if either the sender or receiver is blacklisted.
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 blacklist is meant to stop certain accounts from using a token. Here, when an account was blacklisted, its current tokens were taken away, but the account could still send and receive tokens afterwards. So the blacklist did not actually block the account from using the token.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.