[Node/API] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)
Report
[Node/API] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)
Repo pin: xeprotocol/xe master @ 02e9641 (2026-11-03)
XE-NEW-08 — attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)
Component: api/handler.go:916-936 (handleAttestationRequest passes clientIP(r) as the
rate-limit key), api/handler.go:375-393 (clientIP trusts the last XFF hop from loopback)
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).
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 =
availability; same score, metric matches the narrative).
PoC status: code-verified; the loopback/XFF collapse is established by XE-0081/0168.
POST /attestation/request is unauthenticated and passes clientIP(r) into
node.RequestAttestation, which uses it as the key for allowAttestation/recordAttestation.
clientIP returns the last X-Forwarded-For entry whenever the connection comes from a loopback
host — always the case behind the node's own UI reverse proxy (api/ui.go). The limiter key is
therefore a header the caller chooses: varying XFF per request yields a fresh bucket and the
per-source attestation budget is never exhausted. Each signed attestation is a cheap ed25519
signature issued for any 64-char identifier canAttest accepts, so a single client can drive the
node's signing load and flood the attestation path that lease_renew/lease_settle depend on.
Amplifies XE-0236 (no timekeeper gate on RequestAttestation) by removing the last throttle.
XE-0054 (check-then-act TOCTOU) is a different root cause and is not fixed by making the check
atomic. Fix: key the limiter on the connection peer, not the header, when the direct peer is
loopback.
Dedup. Against the XFF class (XE-0447, XE-0099, XE-0196): those concern rate-limit bucket
rotation on the node API / UI-proxy surface; this finding is the same class (XFF-trusted key) but
a different consequence — the spoofed key is used as the attestor identity passed into
node.RequestAttestation, so a caller can mint attestations for arbitrary identifiers and flood
the signing path, not merely evade a bucket. Against XE-0030, XE-0138, XE-0010: those concern
provider forgery / concurrency / timekeeper checks on the attestation path; none involves the
XFF-derived limiter key. Different root cause, different fix site.
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-0082, 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, reply with what differs and we will look again.