Skip to content
Access control Audit finding Intermediate

Restricted addresses are still able to use Zetachain due to faulty update

0x73696d616f Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/79

Found by

0x73696d616f

Summary

Zetachain has a restricted address list that stops inbounds from going through, link.

However, the restricted addresses book is not correctly set when it is updated later in a config file. Here a watcher is set to update the list when the file is updated. config.go::loadRestrictedAddressesConfig() is called with the old config and the file to update the addresses list from.

config.go::loadRestrictedAddressesConfig() shows that the new addresses fetched from the file are never used, and the old config is used to set the restricted addresses, confirming that these addresses are not updated.

Go
func loadRestrictedAddressesConfig(cfg Config, file string) error {
	input, err := os.ReadFile(file) // #nosec G304
	if err != nil {
		return errors.Wrapf(err, "reading file %s", file)
	}
	addresses := []string{}
	err = json.Unmarshal(input, &addresses)
	if err != nil {
		return errors.Wrap(err, "invalid json")
	}

	restrictedAddressBookLock.Lock()
	defer restrictedAddressBookLock.Unlock()

	// Clear the existing map, load addresses from main config, then load addresses
	// from dedicated config file
	SetRestrictedAddressesFromConfig(cfg)
	for _, addr := range cfg.ComplianceConfig.RestrictedAddresses {
		restrictedAddressBook[strings.ToLower(addr)] = true
	}
	return nil
}

This will lead to catastrophic consequences as an attacker will not be blacklisted when they should and is able to exploit Zetachain how much they want. Essentially, this renders the blacklist mechanism useless and access control can be circumvented.

Root Cause

In node/zetaclient/config/config.go:111, the new restricted addresses from the file are not used.

Internal Pre-conditions

None.

External Pre-conditions

None.

Attack Path

  1. User is restricted by changing the config file by the nodes, but it won't apply and the user will not be blacklisted.

Impact

Attacker can circumvent restricted address access control and keep using the SUI/EVM gateways.

PoC

See above.

Mitigation

Iterate through the new addresses fetched from the file to set the restrictedAddressBook map instead of using the old, stale config.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/zeta-chain/node/pull/3971

gjaldon

The restricted addresses from the loaded file are now being used.

The original report as published on Sherlock, by 0x73696d616f. 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.

What is known

A medium-severity access control bug in ZetaChain Cross-Chain. Sherlock made it public on 28 May 2025. Found in the 857 audit contest (finding M-4).

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

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

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 0x73696d616f

View all

172 more disclosed reports, best first.

More from ZetaChain Cross-Chain

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.