<!-- XE-13376 · Signed marketplace requests never expire: a request signed in 2020 still passes validation, enabling replay amplification · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13376>. The page is the record; this is the same page for reading.*

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](https://github.com/xeprotocol/xe/issues/530)
filed 2026-11-13 03:21 UTC
by AIRDROP TREASURESS

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   P2P / sync

Duplicate of
:   [XE-0009](https://bounty.xe.network/XE-0009) accepted

Tracked
:   internally

Updated
:   2026-11-20 00:53 UTC

Told
:   2026-11-20 00:51 UTC

### Patches

- [xe#537](https://github.com/xeprotocol/xe/pull/537) open by tipprb
  fix(net): add timestamp freshness and expiry validation to marketplace requests (fixes #530)

### History

- [559948](https://bounty.xe.network/log/559948) 2026-11-20 00:52 UTC github.state\_pushed
- [559947](https://bounty.xe.network/log/559947) 2026-11-20 00:52 UTC github.labels
- [559586](https://bounty.xe.network/log/559586) 2026-11-20 00:51 UTC reply.mirrored
- [559060](https://bounty.xe.network/log/559060) 2026-11-20 00:50 UTC proposal.adopted
- [559059](https://bounty.xe.network/log/559059) 2026-11-20 00:50 UTC reply.sent
- [559058](https://bounty.xe.network/log/559058) 2026-11-20 00:50 UTC ticket.status new → closed
- [558163](https://bounty.xe.network/log/558163) 2026-11-20 00:49 UTC proposal.adopted
- [558162](https://bounty.xe.network/log/558162) 2026-11-20 00:49 UTC ticket.facts area
- [558161](https://bounty.xe.network/log/558161) 2026-11-20 00:49 UTC proposal.adopted
- [558160](https://bounty.xe.network/log/558160) 2026-11-20 00:49 UTC ticket.facts
- [558159](https://bounty.xe.network/log/558159) 2026-11-20 00:49 UTC proposal.adopted
- [558158](https://bounty.xe.network/log/558158) 2026-11-20 00:49 UTC ticket.facts

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

### 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](https://github.com/user-attachments/files/34781635/market-node_test.txt)
[market-net\_test.txt](https://github.com/user-attachments/files/34781634/market-net_test.txt)
[market-dir\_test.txt](https://github.com/user-attachments/files/34781633/market-dir_test.txt)

### Thread

**Joseph Denne**team2026-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.
