{"id":"XE-0482","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":202,"title":"[Node/API] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)","area":"node-api","claimed_tier":"minor","assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0082","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-04T11:10:17.457039+00:00","updated_at":"2026-11-05T22:08:11.119527+00:00","source_created_at":null,"told_at":"2026-11-05T22:08:11.454969+00:00","status_changed_at":"2026-11-05T22:08:11.426059+00:00","url":"https://bounty.xe.network/XE-0482","body":"# [Node/API] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)\n\n**Repo pin:** `xeprotocol/xe` master @ `02e9641` (2026-11-03)\n\n## XE-NEW-08 — attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)\n\n**Component:** `api/handler.go:916-936` (`handleAttestationRequest` passes `clientIP(r)` as the\nrate-limit key), `api/handler.go:375-393` (`clientIP` trusts the last XFF hop from loopback)\n**CWE:** CWE-770. **CVSS:** 5.3 — `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`. **Tier:** Minor (650 XE).\n**CVSS 3.1:** 5.3 — `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H` (signing-load flood =\navailability; same score, metric matches the narrative).\n**PoC status:** code-verified; the loopback/XFF collapse is established by XE-0081/0168.\n\n`POST /attestation/request` is unauthenticated and passes `clientIP(r)` into\n`node.RequestAttestation`, which uses it as the key for `allowAttestation`/`recordAttestation`.\n`clientIP` returns the **last** X-Forwarded-For entry whenever the connection comes from a loopback\nhost — always the case behind the node's own UI reverse proxy (`api/ui.go`). The limiter key is\ntherefore a header the caller chooses: varying XFF per request yields a fresh bucket and the\nper-source attestation budget is never exhausted. Each signed attestation is a cheap ed25519\nsignature issued for any 64-char identifier `canAttest` accepts, so a single client can drive the\nnode's signing load and flood the attestation path that `lease_renew`/`lease_settle` depend on.\nAmplifies XE-0236 (no timekeeper gate on RequestAttestation) by removing the last throttle.\nXE-0054 (check-then-act TOCTOU) is a different root cause and is not fixed by making the check\natomic. **Fix:** key the limiter on the connection peer, not the header, when the direct peer is\nloopback.\n\n**Dedup.** Against the XFF class (**XE-0447, XE-0099, XE-0196**): those concern rate-limit bucket\nrotation on the node API / UI-proxy surface; this finding is the same *class* (XFF-trusted key) but\na different *consequence* — the spoofed key is used as the **attestor identity** passed into\n`node.RequestAttestation`, so a caller can mint attestations for arbitrary identifiers and flood\nthe signing path, not merely evade a bucket. Against **XE-0030, XE-0138, XE-0010**: those concern\nprovider forgery / concurrency / timekeeper checks on the attestation path; none involves the\nXFF-derived limiter key. Different root cause, different fix site.\n\n---","patch_refs":[],"thread":[{"id":399,"source":"desk","source_ref":"reply:129","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0082, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, reply with what differs and we will look again.","created_at":"2026-11-05T22:08:11.119527+00:00"}]}