<!-- XE-13208 · net: gossip validators accept unknown JSON fields that subscribers strictly reject — valid votes/blocks are propagated mesh-wide but never ingested · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13208>. The page is the record; this is the same page for reading.*

XE-13208 · Bounty

# net: gossip validators accept unknown JSON fields that subscribers strictly reject — valid votes/blocks are propagated mesh-wide but never ingested

Closed · duplicate
—claimed Minor
web
filed 2026-11-14 19:46 UTC
by xe:b4c356d4

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 19:45 UTC

Told
:   2026-11-20 19:45 UTC

### Patches

None linked.

### History

- [626147](https://bounty.xe.network/log/626147) 2026-11-20 19:45 UTC proposal.adopted
- [626146](https://bounty.xe.network/log/626146) 2026-11-20 19:45 UTC reply.sent
- [626145](https://bounty.xe.network/log/626145) 2026-11-20 19:45 UTC ticket.status new → closed
- [621811](https://bounty.xe.network/log/621811) 2026-11-20 19:44 UTC proposal.adopted
- [621810](https://bounty.xe.network/log/621810) 2026-11-20 19:44 UTC ticket.facts area
- [621807](https://bounty.xe.network/log/621807) 2026-11-20 19:44 UTC proposal.adopted
- [621806](https://bounty.xe.network/log/621806) 2026-11-20 19:44 UTC ticket.facts
- [621801](https://bounty.xe.network/log/621801) 2026-11-20 19:44 UTC proposal.adopted
- [621800](https://bounty.xe.network/log/621800) 2026-11-20 19:44 UTC ticket.facts
- [612933](https://bounty.xe.network/log/612933) 2026-11-20 15:29 UTC note.added
- [612932](https://bounty.xe.network/log/612932) 2026-11-20 15:29 UTC proposal.created
- [612931](https://bounty.xe.network/log/612931) 2026-11-20 15:29 UTC proposal.created

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

### Report

## Summary

Block and vote gossip topics decode the same wire bytes two different ways.
The topic validators use plain `json.Unmarshal` (unknown fields ignored);
the `Subscribe` loops use a `json.Decoder` with `DisallowUnknownFields`
(unknown fields rejected). A vote or block carrying one extra JSON field
with an otherwise-valid signature/hash therefore passes its topic
validator — `ValidationAccept`, forwarded mesh-wide — but is dropped by
every node's `Subscribe` loop with a `Warnf`, never reaching
`VoteManager`/ledger. The other four topics do not diverge: StateChain,
Directory, and Certificate subscribers use plain `Unmarshal`, matching
their validators; only Block and Vote are strict on subscribe.

- Validators: `net/gossip_validate.go:66` (`blockValidator`) and `:103`
  (`voteValidator`) — plain `json.Unmarshal`, then hash/PoW (block) and
  signature (vote) checks, then `ValidationAccept`.
- Subscribers: `net/gossip.go:139-145` (`Gossip.Subscribe`) and `:209-216`
  (`VoteGossip.Subscribe`) — `json.NewDecoder` \+
  `dec.DisallowUnknownFields()`; decode error → `Warnf(... unmarshal error ...)` → `continue` (message dropped).

## Reproduction (xe @ 89a542e, real loopback libp2p hosts)

Codec level (`TestR8ValidatorSubscriberDivergence`,
`zz_r8_units_test.go`): byte-surgery injection appending one extra field
to a marshalled `VoteMsg`/`BlockMsg`, preserving the signed bytes
exactly — validator-style unmarshal accepts, subscriber-style strict
decode rejects with `json: unknown field "future_field"`, for BOTH vote
and block.

Live mesh (`TestR8GossipUnknownFieldLive`, `zz_r8_gossip_test.go`):
2-node real pubsub mesh; attacker publishes a validly-signed vote with
one extra field; victim runs the real `VoteGossip.Subscribe` loop.
Observed: the victim logged `vote gossip unmarshal error: json: unknown field "future_field"` (delivery to the subscriber proves the validator
Accepted it — gossipsub does not deliver rejected messages), the weird
vote was never ingested, the clean control vote was delivered, and a
garbage/oversized burst caused no panic/wedge. Full harness run 20/20
PASS (`~/workspace/work/xe-hunt-r8/full-run.log`).

## Impact

Two consequences, stated with their bounds. (a) Forward-compat break:
any future client version emitting a new field has its votes/blocks
propagated-but-never-ingested network-wide — the producer sees gossip
acceptance while zero nodes ingest. No producer emits unknown fields
today, so this bites on version skew, not on the current network; no
consensus split is claimed (the drop is uniform across nodes). (b)
Log-spam vector: a modified client can emit valid-signature
unknown-field votes that every node `Warnf`-logs (no PoW on votes);
volume is bounded by the rotating writer's size/file caps, and the
per-message verify cost is the one XE-8347 already claims — disclosed
so triage can weigh it. Minor: a proven codec divergence with a
one-line-class fix, whose worst case is silent network-wide vote/block
loss during an upgrade.

## Duplicate check (queries re-run 15 Nov 2026; neighbour bodies read)

- `DisallowUnknownFields` (1 hit): XE-11788 — statechain sync nil-block
  dereference crash, body read; different subsystem, different mechanism
  (nil deref, not unknown-field divergence).
- `unknown field` (1 hit): XE-1968 — `ValidateGenesis` never calls
  `ValidateOp`; genesis validation, unrelated (title-level).
- `forward compat` (0 hits). `unknown-field`/`strict decod` wordings
  covered by the above; no ticket names the validator/subscriber
  divergence.
- Family: XE-8347 (vote flood, body read in full in R8) claims
  verify-cost flooding by valid-signature votes — a distinct mechanism
  from this codec divergence; the log-spam overlap is disclosed above.
  XE-2620 (`enqueueVote`) is a different drop path. Nothing title-only
  except XE-1968, whose title rules it out.

## Suggested fix

Make validators and subscribers agree on unknown fields — either
strict-decode in the validators (Reject unknown fields, with score
penalty, so bad messages are not forwarded) or drop
`DisallowUnknownFields` in the two `Subscribe` loops (so
validator-accepted messages are ingestible). Either direction closes
the propagated-but-never-ingested gap.

### Thread

**Joseph Denne**team2026-11-20 19:45 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-13208 and says what differs; it is read like any other.
