Skip to content
Smart contracts Audit finding Advanced

A malicious operator will control consensus without risking stake (stake-exit lag exploit)

The report describes two separate vulnerabilities in the Symbiotic relay settlement system. First, a malicious operator can withdraw their stake after being selected as a validator but before committing a validator set header, allowing them to control consensus without risking slashing. Second, an operator with minimal voting power can forge a proof by adding a fake validator with a null public key and arbitrarily high voting power, bypassing quorum verification.

0x73696d616f Follow with hunt1 and montecristo

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-06-symbiotic-relay-judging/issues/446

This issue has been acknowledged by the team but won't be fixed at this time.

Found by

0x73696d616f, hunt1, montecristo

Summary

The non-atomic nature of setSigVerifier and commitValSetHeader will cause a potential loss of security guarantees for networks as a malicious operator can manipulate validator sets after unstaking their funds, avoiding slashing penalties.

Root Cause

In Settlement contract the design choice to separate setSigVerifier and commitValSetHeader functions (latter being public) is a mistake as it allows for a time gap between validator selection and header commitment. This creates a window where an operator can withdraw their stake while still maintaining their voting power.

Specifically, commitValSetHeader in Settlement is marked as public:

https://github.com/sherlock-audit/2025-06-symbiotic-relay/blob/main/middleware-sdk/src/contracts/modules/settlement/Settlement.sol#L292-L324

While setSigVerifier is a separate function:

https://github.com/sherlock-audit/2025-06-symbiotic-relay/blob/main/middleware-sdk/src/contracts/modules/settlement/Settlement.sol#L267-L275

Attack Path

Epoch 1:

  1. A malicious operator deposits a large amount of stake to their vault, ensuring it exceeds the quorumThreshold for voting power.
  2. The off-chain relay calculates voting powers, creates a sigVerifier using validators belonging to the malicious operator, and calls setSigVerifier to assign these validators for the next epoch.
  3. Near the end of Epoch, the operator calls withdraw on their vault to initiate the withdrawal of their stake.

Epoch 2:

  1. The operator immediately calls claim on their vault to retrieve all their withdrawn stake, effectively removing their financial exposure.
  2. Despite having withdrawn their stake, their voting power is active in the system's state for a short time-span.
  3. The operator can craft their own proof using their validators' private keys, which will pass verification since they had enough voting power.
  4. When the operator submits this crafted proof to commitValSetHeader, it will be accepted by the system, allowing the operator to control consensus without any stake at risk.

Impact

The network suffers a complete compromise of its security model. The malicious operator can perform any validator action (such as approving invalid transactions or censoring valid ones) without having any stake at risk of being slashed. This fundamentally breaks the economic security assumptions of the protocol, which relies on validators having skin in the game to behave honestly.

Mitigation

Redesign the commitValSetHeader function to be internal (_commitValSetHeader), and create a new public function that handles both setting the signature verifier (optional) and committing the header in a single atomic transaction.

Alternatively apply checkPermission to commitValSetHeader so it can only be executed by the Network's relay service.

Issue Z-1: Malicious operator can alone, with any voting power smaller than quorum forge a proof

Source: https://github.com/sherlock-audit/2025-06-symbiotic-relay-judging/issues/452

Found by

0x73696d616f, vinica_boy

Summary

A malicious operator with any voting power (considering a minimum inclusion voting power if present) smaller than the quorum can forge a proof and bypass verification, setting the next epoch header to any value, taking over the network. Firstly, in circuit.go, operators with keys X, Y equal to 0 are not part of the validator set hash and are skipped whenever they are last.

Go
		valsetHash = api.Select(
			api.And(fieldFpApi.IsZero(&circuit.ValidatorData[i].Key.X), fieldFpApi.IsZero(&circuit.ValidatorData[i].Key.Y)),
			valsetHash,
			valsetHashTemp,
		)

The reason the X = 0, Y = 0 operators need to be last to be skipped, is because the valsetHash takes the temp value when the key is not null. Hence, if we have an empty key (0,0), followed by a non empty key, valsetHash will take the value of valsetHashTemp again, which includes the full mimc hash, which is cumulative:

Go
		hashAffineG1(&mimcApi, &circuit.ValidatorData[i].Key)
		mimcApi.Write(circuit.ValidatorData[i].VotingPower)
		valsetHashTemp := mimcApi.Sum()

Hence, for this to work, the operators must be sent as [OP1, ..., OPn, (0,0)], so valsetHash takes the hash of the set up until OPn. It needs to exclude the (0,0) key from the validator set because the MIMC hash is checked against the real hash, which doesn't contain this (0,0) key.

Now, the (0,0) key is not a real operator, so their voting power contribution must be 0. However, it's actually possible to set any voting power (up until var size constraints), exceeding the quorum, of this fake (0,0) validator, and the proof still goes through.

The IsNonSigner flag is set to false of this (0,0) validator, so the voting power counts. As a result, their (0,0) key is also added to the signing aggregated key. However, the null (0,0) key point property is that its addition to the aggregate key has no effect, which means that effectively no signature is required from the null (0,0) key. Thus, having validators [OP1, ..., OPn, (0,0)], with an aggregated signature of validators 1 to n, will pass the signature verification.

This effectively means that any operator with any minimal voting power can add this (0,0) operator with a voting power that exceeds the quorum and lets the message go through. As a result, they can manipulate whatever data they want and take full control of the network, more precisely the valSetHeader for the next epoch in Settlement.sol, fully compromising the network.

Root Cause

In circuit.go:101, the voting power of an operator with null key must be null.

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Operator with 1 voting power (or any minimal amount) calls Settlement::commitValSetHeader() with a malicious header for next epoch to compromise the network. They send a proof with only them as signer, all other operators are non signers and add at the end a null operator (0,0) with voting power bigger than the quorum.

Impact

Network is compromised and attacker can do whatever they want. Operator role is permissionless for some networks (depending on extensions) and even if it wasn't, they would still be able to completely bypass the quorum which is high severity.

PoC

Change proof_test.go to:

Go
func genValset(numValidators int, nonSigners []int) []ValidatorData {
	valset := make([]ValidatorData, numValidators)
	for i := 0; i < numValidators; i++ {
		pk := big.NewInt(int64(i + 1000000000000000000))
		valset[i].PrivateKey = pk
		valset[i].Key = getPubkeyG1(pk)
		valset[i].KeyG2 = getPubkeyG2(pk)
		valset[i].VotingPower = big.NewInt(1) // this has to be the real voting power of the rest of the set but it doesn't really matter for this poc as they won't sign. Only validator i == 0 is signing.
		valset[i].IsNonSigner = false
		if i != 0 {
			valset[i].IsNonSigner = true
		}
	}

	for _, nonSigner := range nonSigners {
		valset[nonSigner].IsNonSigner = true
	}

	return valset
}

Change helpers.go to the following. Note that n is 11 (set has length 10) to add the null key (0,0).

Go
func NormalizeValset(valset []ValidatorData) []ValidatorData {
	// Sort validators by key in ascending order
	sort.Slice(valset, func(i, j int) bool {
		// Compare keys (lower first)
		return valset[i].Key.X.Cmp(&valset[j].Key.X) < 0 || valset[i].Key.Y.Cmp(&valset[j].Key.Y) < 0
	})
	n := 11 //getOptimalN(len(valset))
	normalizedValset := make([]ValidatorData, n)
	for i := range n {
		if i < len(valset) {
			normalizedValset[i] = valset[i]
		} else {
			zeroPoint := new(bn254.G1Affine)
			zeroPoint.SetInfinity()
			zeroPointG2 := new(bn254.G2Affine)
			zeroPointG2.SetInfinity()
			normalizedValset[i] = ValidatorData{PrivateKey: big.NewInt(0), Key: *zeroPoint, KeyG2: *zeroPointG2, VotingPower: big.NewInt(30000000000000 * 10), IsNonSigner: false}
		}
	}
	return normalizedValset
}

In proof.go set MaxValidators = []int{11}. If the 3 verifiers 10, 100, 1000 were used this wouldn't be needed but the current commit defaults to 10 only and it's easier to allow 11 for this POC.

Go to pkg/proof and run go test ., it passes with 1 real voting power.

Mitigation

If the key is null, voting power must be null.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/symbioticfi/relay-contracts/pull/33/commits/8d0d70bd47afa5029a0cf72ef82c49754fd2201c

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.

How it worked

Root cause

Likely, the root causes are the non-atomic separation of setting the signature verifier and committing the validator set header, and the failure to enforce that a validator with a null public key must have zero voting power.

Impact

The network suffers a complete compromise of its security model, as the malicious operator can perform any validator action without having any stake at risk of being slashed.

What the attacker needed

Operator role (permissionless for some networks); ability to deposit stake exceeding quorum; ability to withdraw and claim stake

The fix

The protocol team fixed this issue in the following PRs/commits: https://github.com/symbioticfi/relay-contracts/pull/33/commits/[redacted]

How it was found

  1. A malicious operator deposits a large amount of stake to their vault, ensuring it exceeds the quorum threshold for voting power.
  2. The off-chain relay calculates voting powers, creates a sigVerifier using validators belonging to the malicious operator, and calls setSigVerifier to assign these validators for the next epoch.
  3. Near the end of Epoch, the operator calls withdraw on their vault to initiate the withdrawal of their stake.
  4. The operator immediately calls claim on their vault to retrieve all their withdrawn stake, effectively removing their financial exposure.
  5. The operator can craft their own proof using their validators' private keys, which will pass verification since they had enough voting power.
  6. When the operator submits this crafted proof to commitValSetHeader, it will be accepted by the system, allowing the operator to control consensus without any stake at risk.

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.

This report describes two bugs in a blockchain relay system. In the first, an operator can take their money out after being chosen to validate but before their validation is finalised, so they can misbehave without losing their deposit. In the second, an operator can trick the system into accepting a fake validator with no real identity but huge voting power, letting them approve anything they want.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by 0x73696d616f

View all

172 more disclosed reports, best first.

More from Symbiotic Relay

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.