Bounty
XE-13376 · Bounty

Signed marketplace requests never expire: a request signed in 2020 still passes validation, enabling replay amplification

Closed · duplicate —claimed Minor xe#530 filed 2026-11-13 03:21 UTC by AIRDROP TREASURESS

Report

Suggested tier: Low

XE address (reward destination): 9b663fdac108be34a3b715ef78a9f9bd878af6ef8142f388c6514918e6852dd7

Summary

net/gossip_validate.go, marketplaceValidator, request case: the ONLY checks on an incoming marketplace request are (a) request.Signature valid over request.PubKey, and (b) timestamp not in the future (request.Timestamp > now+1m). There is NO freshness check on old timestamps, NO nonce, and NO expiry.

So a signed request can be replayed indefinitely. Any node that relays it will re-gossip it (the gossip validator passes it again), and any provider that sees it will treat it as a fresh request and send an offer. A single captured request can be replayed across the network forever, generating offer traffic and filling pendingOffers on every node (see issue #526 for the pendingOffers cap — a replayed request can be used to fill the cap with offers).

Impact

Replay amplification: one signed request → unlimited replays → offer traffic on every node + pendingOffers exhaustion (1000-offer cap). The request itself cannot create a fraudulent lease (the consumer must sign the lease; the ledger re-verifies cost), so the impact is bounded to DoS / traffic amplification — hence Low.

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 market-node_test.go node/
cp market-net_test.go net/
go test ./node -run TestMarket -v -count=1
go test ./net -run TestMarket -v -count=1

Note: market-node_test.go / market-net_test.go are NOT in the public repository — the PoC test files are attached to this issue; without them, the XE team cannot run this reproduction.

PoC 3 — signed request from 2020 passes validation (TestMarketRequest_NeverExpires, in market-net_test.go): a request with Timestamp 2020-01-01 and a valid signature is fed through the real marketplaceValidator.

Expected: the ancient request is rejected. Actual (reproduced 2026-11-13): the request passes validation and is re-gossiped.

CONFIRMED: signed request from 2020-01-01 passes validation (no expiry / freshness check)

Root cause

net/gossip_validate.go, marketplaceValidator, request case: no lower-bound timestamp check, no nonce, no expiry; types/types.go, MarketplaceRequest has no TTL field.

Suggested fix

Add a freshness window for requests (e.g. 60 s, matching the pendingOffers prune) and a nonce per consumer, or an expiry field in MarketplaceRequest checked on ingest.

Controls verified (same PoC files, all PASS)

  • Cross-context signature reuse (ad ↔ request ↔ offer) is rejected — distinct domain tags (xe/marketplace-advertisement/v1, -request/v1, -offer/v1) plus different field sets (TestMarketCrossContext_SignatureReuseRejected).
  • TotalCost / Timestamp forgery is rejected — both fields are signature-covered; only exact replays pass (TestMarketTamper_TotalCostAndTimestampSigned). Even a tampered cost could not create a bad lease (ledger recomputes LeaseCost from the pinned cert).
  • Stale-price lease via a replayed offer is not reachable through the honest consumer flow: RequestLease generates a fresh RequestID per call and only accepts offers for it, and the ledger re-verifies cost against the pinned certificate.
  • Directory impersonation / registration replay is neutralised (monotonicity + 30 min TTL, TestMarketDir_MonotonicityRejectsOldReplay, market-dir_test.go).

market-node_test.txt market-net_test.txt market-dir_test.txt

Thread

Joseph Denneteam2026-11-20 00:51 UTCgithub

Thanks. This is the same finding as https://bounty.xe.network/XE-0009, 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-13376 and says what differs; it is read like any other.