{"id":"XE-0686","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"270","source_url":"https://github.com/xeprotocol/xe/issues/270","reporter_id":7,"title":"Marketplace requests have no deduplication or rate limit: each valid request forces every provider to sign and publish an offer","area":"leasing-ledger","claimed_tier":"minor","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-05T11:42:03.367129+00:00","updated_at":"2026-11-10T00:11:48.018398+00:00","source_created_at":"2026-11-05T11:40:06+00:00","told_at":"2026-11-08T20:09:16+00:00","status_changed_at":"2026-11-08T20:09:13.311369+00:00","url":"https://bounty.xe.network/XE-0686","body":"Suggested severity tier: Low\n\nArea: marketplace request handling, node/node.go (handleMarketplace), net/gossip.go, net/marketplace_sign.go\n\nRepository state checked: xeprotocol/xe HEAD 978785929bc17a2f4ab30c383e5fc9cf4d634512\n\n## Summary\n\nThe marketplace request handler has no deduplication, no per-consumer cache, and no rate limit. Every request that passes signature verification makes the provider check capacity, compute a price, sign an offer, and publish it to the whole mesh, and every node on the mesh verifies each published offer. There is no proof of work on marketplace messages. An attacker can re-sign the same request with a fresh timestamp, which produces new signed bytes and a new gossipsub message ID, so gossipsub deduplication never sees it as a repeat. One attacker message therefore turns into provider CPU and bandwidth work across the mesh, with no cost to the attacker beyond one signature per request.\n\n## What was proven\n\nhandleMarketplace case \"request\" (node/node.go:1311-1390) has no RequestID dedup, no request cache, and no per-consumer rate limit. A request that passes VerifyRequest goes through capacity checks, LeaseCost, SignOffer, and Publish. The gossip options (net/gossip.go:40-60) set no per-peer rate limit for gossip messages, and peer scoring rewards valid first deliveries. The request canonical form (net/marketplace_sign.go:44-56) includes Timestamp in the signed fields, so re-signing with a new timestamp creates a new message that gossipsub treats as new.\n\nProven with a local test against the real code: the same RequestID passed VerifyRequest under three different signatures (new timestamp plus changed resource fields). A code search found no seenRequests, requestCache, or any deduplication for requests in node/ or net/. What was not executed is the final step of the chain, a provider actually publishing offers in response to a flood, which needs a two-node harness.\n\n## Reproduction\n\n1. Clone https://github.com/xeprotocol/xe and confirm HEAD is 978785929bc17a2f4ab30c383e5fc9cf4d634512.\n2. Generate a keypair and sign a valid marketplace request.\n3. Re-sign the same RequestID with a fresh timestamp and deliver it again. Observe that VerifyRequest accepts it as a new message.\n4. Repeat and observe that nothing in the handler deduplicates or rate-limits the repeated requests.\n\n## Impact\n\nEach request costs the attacker microseconds of signing and costs every provider a verification, a price computation, a signature, and a mesh-wide publish, plus a verification of each offer on every mesh node. The effect is CPU and bandwidth load only. It stops when the flood stops, and it leaves no permanent state except pending offers being pushed out, which is a separate issue. No funds move: an offer only becomes a lease when the consumer chooses it, and the consumer here is the attacker.\n\n## Suggested fix\n\nDeduplicate requests by RequestID at the handler with a short-lived cache, add a per-consumer rate limit on requests, and consider a small proof of work for marketplace requests in the same style as chat envelopes.\n\n## Honest limits of this proof\n\nThe premises were proven locally: the same RequestID is accepted under multiple signatures, and no deduplication or rate limit exists in the code. The end-to-end amplification (counting offers a provider publishes per hundred requests) was not executed and needs a two-node harness. This report makes no claim about the public testnet.","patch_refs":[{"id":311,"repo":"xeprotocol/xe","kind":"pr","ref":"286","title":"fix(cli,client,chat,node,api): harden CLI flag parsing, provider errors, chat PoW bounds, marketplace rate-limit, and API pagination","url":"https://github.com/xeprotocol/xe/pull/286","note":"","state":"open","author":"Khanhtnq","added_by":"desk","created_at":"2026-11-06T12:42:47.419656+00:00"},{"id":481,"repo":"xeprotocol/xe","kind":"pr","ref":"315","title":"fix(node): deduplicate marketplace requests and enforce per-consumer rate limits (fixes #270)","url":"https://github.com/xeprotocol/xe/pull/315","note":"","state":"open","author":"arturbarszcz78","added_by":"desk","created_at":"2026-11-10T00:12:01.832547+00:00"}],"thread":[{"id":762,"source":"github","source_ref":"6716871142","author":"rusdiwireng","team":false,"body":"Thanks for the fix in PR #286 — I reviewed it locally against the PR code, and the RequestID dedup closes the re-sign vector this issue reported (a duplicate RequestID is rejected, and the 11th request from the same consumer within a minute is rejected). One leg is still open:\n\nThe per-consumer rate limit (10 requests per minute) can be rotated away by changing identity. The consumer is self-asserted, and VerifyRequest only checks that the signature matches the claimed key, while a fresh ed25519 keypair is free to generate. Verified with a local probe: 20 fresh identities, each sending one request with a fresh RequestID and a valid signature, all passed within the same minute. So the flood in this report still works, it just has to change identity every 10 requests.","created_at":"2026-11-08T03:46:23+00:00"},{"id":914,"source":"github","source_ref":"6726488913","author":"Joseph Denne","team":true,"body":"Thanks for the report. We have confirmed the behaviour you describe in the marketplace request handling and it is being handled. We will update this ticket when a fix has shipped.","created_at":"2026-11-08T20:09:16+00:00"}]}