<!-- XE-13377 · Gossip validators accept blocks and statechain blocks with garbage signatures — no signature verification on inbound blocks · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13377>. The page is the record; this is the same page for reading.*

XE-13377 · Bounty

# Gossip validators accept blocks and statechain blocks with garbage signatures — no signature verification on inbound blocks

Closed · invalid
—claimed Minor
[xe#531](https://github.com/xeprotocol/xe/issues/531)
filed 2026-11-13 03:22 UTC
by AIRDROP TREASURESS

Verdict
:   Invalid

Tier
:   —

Claimed
:   Minor

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 01:07 UTC

Told
:   2026-11-20 01:06 UTC

### Patches

None linked.

### History

- [561369](https://bounty.xe.network/log/561369) 2026-11-20 01:06 UTC reply.mirrored
- [561358](https://bounty.xe.network/log/561358) 2026-11-20 01:05 UTC reply.sent
- [559712](https://bounty.xe.network/log/559712) 2026-11-20 00:51 UTC github.state\_pushed
- [559654](https://bounty.xe.network/log/559654) 2026-11-20 00:51 UTC github.labels
- [559395](https://bounty.xe.network/log/559395) 2026-11-20 00:50 UTC proposal.adopted
- [559329](https://bounty.xe.network/log/559329) 2026-11-20 00:50 UTC proposal.adopted
- [559328](https://bounty.xe.network/log/559328) 2026-11-20 00:50 UTC ticket.status new → closed
- [559226](https://bounty.xe.network/log/559226) 2026-11-20 00:50 UTC proposal.adopted
- [559225](https://bounty.xe.network/log/559225) 2026-11-20 00:50 UTC ticket.facts area
- [559221](https://bounty.xe.network/log/559221) 2026-11-20 00:50 UTC proposal.adopted
- [559220](https://bounty.xe.network/log/559220) 2026-11-20 00:50 UTC ticket.facts
- [556499](https://bounty.xe.network/log/556499) 2026-11-20 00:47 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13377) · [JSON](https://bounty.xe.network/v1/tickets/XE-13377) · [markdown](https://bounty.xe.network/XE-13377.md)

### Report

**Suggested tier:** Low

**XE address (reward destination):** 9b663fdac108be34a3b715ef78a9f9bd878af6ef8142f388c6514918e6852dd7

## Summary

Blocks and statechain blocks received over gossip are never signature-checked:

- `net/gossip.go: onBlockMessage` — the block is passed straight to `handleBlockGossip`, which calls `n.ledger.AddBlock(block)` after a re-validation that **never calls `VerifyBlockSignature`** (core/ledger.go: `validateAndAddBlock` → `validateBlockBasic`, `validateBlockSequential`).
- `net/gossip.go: onStatechainBlockMessage` — same: straight to `n.scLedger.AddBlock(block)` with no signature check.
- `net/sync.go: requestSync` — a peer's sync response is trusted the same way.

`core/ledger.go: validateBlockSequential` checks the previous hash, timestamp window, fees, balance, and the block hash — but NOT the signature. `VerifyBlockSignature` exists in `core/ledger.go` and is called only from `core/validate_vote.go` (vote validation) and `core/ledger.go: rollback.go` (`rollbackBlockAt`, called from `RollbackBlock`).

This is a consensus-layer integrity gap: a garbage-signature block can enter the ledger through gossip. The ledger does not accept it blindly — `validateBlockSequential` still enforces the previous-hash chain, timestamp window, fee, and balance rules, and `AddBlock` rejects blocks that fail those checks — so the practical impact is limited to garbage blocks that pass those checks being stored and gossiped further (the network then wastes bandwidth and storage on them, and a fork can be created by a garbage block that passes the sequential checks).

## Impact

Low: no direct fund loss, no account freeze, no consensus halt — the ledger's sequential checks still bound what a garbage block can do. The gap is real but its blast radius is limited: garbage blocks that pass the sequential checks can be stored and re-gossiped, wasting bandwidth/storage and potentially creating forks that then need to be resolved by the conflict machinery.

## Steps to reproduce

Unit test against the real node code (`github.com/xeprotocol/xe`, testnet-0005, commit `89a542e`):

```
git clone https://github.com/xeprotocol/xe
cd xe
cp trackb_gossip_test.go core/
go test ./core -run TestTrackB_GossipAcceptsGarbageSignature -v -count=1
```

Note: `trackb_gossip_test.go` is NOT in the public repository — the PoC test file is attached to this issue; without it, the XE team cannot run this reproduction.

`TestTrackB_GossipAcceptsGarbageSignature`: a block with a garbage signature (random bytes) is fed through the real gossip path.

**Expected:** the block is rejected for bad signature.
**Actual (reproduced 2026-11-13):** the block is accepted into the ledger.

```
CONFIRMED: block with garbage signature accepted into ledger (no signature verification on gossip path)
```

## Root cause

`net/gossip.go: onBlockMessage` / `onStatechainBlockMessage` and `net/sync.go: requestSync` never call `VerifyBlockSignature`; `core/ledger.go: validateBlockSequential` does not verify the block signature (only `validate_vote.go` and `rollback.go` call it).

## Suggested fix

Call `VerifyBlockSignature` in `validateBlockSequential` (or at the gossip/sync entry points) so every inbound block is signature-checked before being stored or re-gossiped.

## Controls verified (same PoC file, all PASS)

- A block with a wrong previous hash is rejected (`validateBlockSequential` previous-hash check).
- A block with a future timestamp is rejected (timestamp window).
- A block with insufficient balance is rejected (balance check).
- A block with a tampered fee is rejected (fee check).

[trackb\_gossip.txt](https://github.com/user-attachments/files/34781689/trackb_gossip.txt)

### Thread

**XE desk**team2026-11-20 01:06 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13377 and says what; it is read like any other.
