Skip to content
Access control Audit finding Intermediate

Jailed validators are able to participate in voting

The voting logic only checked that a validator was not tombstoned, but did not check if the validator was jailed. A jailed validator could still vote on inbound and outbound ballots, despite having misbehaved.

BrothersInCode Follow with forgebyola

Originally disclosed on Sherlock

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

Found by

BrothersInCode, forgebyola

Description

When voting on an inbound or outbound ballot, the following check is performed:

Go
func (k Keeper) VoteOnInboundBallot(
	ctx sdk.Context,
	senderChainID int64,
	receiverChainID int64,
	coinType coin.CoinType,
	voter string,
	ballotIndex string,
	inboundHash string,
) (isFinalized bool, isNew bool, err error) {
	// ... code

	// Ensure the voter is an active (non-tombstoned) observer
	if ok := k.IsNonTombstonedObserver(ctx, voter); !ok {
		return false, false, types.ErrNotObserver
	}

	// ... code
}

This prevents tombstoned validators from voting on the observation chain. However, the current logic does not prevent jailed validators from voting.

In contrast, a jailed check is correctly performed during observer updates:

Go
func (k msgServer) UpdateObserver(
	goCtx context.Context,
	msg *types.MsgUpdateObserver,
) (*types.MsgUpdateObserverResponse, error) {
	// ... code

	// New observer must be a bonded, non-jailed validator
	err = k.IsValidator(ctx, msg.NewObserverAddress)
	if err != nil {
		return nil, errorsmod.Wrap(types.ErrUpdateObserver, err.Error())
	}
}

Within IsValidator:

Go
if validator.Jailed || !validator.IsBonded() {
	return types.ErrValidatorStatus
}

This ensures that only active, non-jailed validators can be assigned as observers.

Impact

Since no such check exists during voting, jailed validators are still able to vote, even though they may have misbehaved.

Recommendation

Add a jailed validator check during the voting process to ensure that only bonded and non-jailed validators are allowed to vote.

Discussion

sherlock-admin2

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

gjaldon

The issue has been fixed by replacing all instances of IsNonTombstonedObserver() with CheckObserverCanVote(), which also checks if a validator is jailed.

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

Impact

Jailed validators, who may have misbehaved, could still participate in voting on ballots.

What the attacker needed

Validator is jailed; validator is an observer

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 blockchain, validators are special nodes that help confirm transactions. If a validator misbehaves, it can be 'jailed' (temporarily removed from duties) or 'tombstoned' (permanently removed). This report found that the system only checked for tombstoned validators when voting, so jailed validators could still vote, which should not be allowed.

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 BrothersInCode

View all

1 more disclosed report, 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.