Skip to content
Access control Audit finding Intermediate

Banned BLS public keys can still be registered

The registration function checked only whether a BLS public key belonged to the LSD network, not whether it was banned, so a banned key could still be registered. An attacker could register a previously banned BLS public key and the call would succeed.

Lambda Follow with bearonbike

Originally disclosed on Code4rena

Submitted by Lambda, also found by bearonbike

In registerBLSPublicKeys, it should be checked (according to the comment and error) if a BLS public key is part of the LSD network and not banned:

// check if the BLS public key is part of LSD network and is not banned
require(isBLSPublicKeyPartOfLSDNetwork(_blsPublicKey) == false, "BLS public key is banned or not a part of LSD network");

However, this is not actually checked. The function isBLSPublicKeyPartOfLSDNetwork only checks if the public key is part of the LSD network:

function isBLSPublicKeyPartOfLSDNetwork(bytes calldata _blsPublicKeyOfKnot) public virtual view returns (bool) {
        return smartWalletOfKnot[_blsPublicKeyOfKnot] != address(0);
}

The function isBLSPublicKeyBanned would perform both checks and should be called here:

function isBLSPublicKeyBanned(bytes calldata _blsPublicKeyOfKnot) public virtual view returns (bool) {
        return !isBLSPublicKeyPartOfLSDNetwork(_blsPublicKeyOfKnot) || bannedBLSPublicKeys[_blsPublicKeyOfKnot] != address(0);
}

Because of that, it is possible to pass banned BLS public keys to registerBLSPublicKeys and the call will succeed.

Recommended Mitigation Steps

Use isBLSPublicKeyBanned instead of isBLSPublicKeyPartOfLSDNetwork.

vince0656 (Stakehouse) confirmed


The original report as published on Code4rena, by Lambda. 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 registration function called a helper that only checks network membership instead of the helper that also checks the banned list.

What the attacker needed

Ability to call registerBLSPublicKeys

The fix

The registration function should call `isBLSPublicKeyBanned` instead of `isBLSPublicKeyPartOfLSDNetwork`.

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 a list of blocked keys that should not be allowed back in. The registration function used a check that only asked 'is this key known?' instead of the stronger check that also asks 'is this key blocked?'. So a blocked key could be registered again.

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 Lambda

View all

64 more disclosed reports, best first.

More from LSD Network - Stakehouse 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.