56657 bc insight inactive validator scheduling bypass in vechain thor pos consensus mechanism

Submitted on Oct 19th 2025 at 01:53:25 UTC by @Angry_Mustache_Man for Attackathon | VeChain Hayabusa Upgrade

  • Report ID: #56657

  • Report Type: Blockchain/DLT

  • Report severity: Insight

  • Target: https://github.com/vechain/thor/compare/master...release/hayabusa

  • Impacts:

    • A bug in the respective layer 0/1/2 network code that results in unintended smart contract behavior with no concrete funds at direct risk

Description

Brief/Intro

A vulnerability exists in the VeChain Thor Proof-of-Stake (PoS) consensus mechanism that allows inactive/offline validators to be included in the block production scheduling sequence, bypassing the staking system's online participation requirements. This vulnerability affects the pos.NewScheduler() function in pos/sched.go and can lead to consensus calculation errors and scheduling inconsistencies.

Vulnerability Details

The condition p.Active || p.Address == addr creates a privilege escalation where:

https://github.com/vechain/thor/blob/b4c914fe573ed6141daa159fa293e9193a96d74f/pos/sched.go#L75-L82

// but only active/online validators will be picked for block production
if p.Active || p.Address == addr {
    shuffled = append(shuffled, entry{
        address: p.Address,
        weight:  p.Weight,
        active:  p.Active,
        score:   -math.Log(random) / float64(p.Weight),
    })
  • Normal validators: Must be Active = true (online) to be included in scheduling.

  • Node Master: Gets included regardless of their online status.

  • There are no checks done before this function too.

Even the codebase comments indicate an error should be returned if the node master was not Active, but that check is not implemented:

https://github.com/vechain/thor/blob/b4c914fe573ed6141daa159fa293e9193a96d74f/pos/sched.go#L40-L47

Bug Flow

1

Step: Node master goes offline

Node master goes offline but remains registered in staking system.

2

Step: Scheduler includes offline node master

Scheduler includes offline node master in scheduling sequence due to p.Address == addr bypass.

3

Step: Consensus calculations include offline validator's weight

Consensus calculations include offline validator's weight, affecting totals.

4

Step: Scheduling becomes inconsistent

Scheduling becomes inconsistent with actual network state and violates online participation requirements.

Impact Details

Including an offline Node creates delays and inconsistencies. It violates the "online participation" consensus requirement for block production and creates consensus calculation errors by including offline validator's weight in total weight calculations.

Proof of Concept

Include this test in the file pos/sched_test.go:

Run the test:

go test -v -run TestScheduler_InactiveProposerVulnerability_POC ./pos -cover

Sample test output

Was this helpful?