<!-- XE-0482 · [Node/API] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0482>. The page is the record; this is the same page for reading.*

XE-0482 · Bounty

# \[Node/API\] Attestation rate limit is keyed on the attacker-controlled X-Forwarded-For value of an unauthenticated endpoint (Low)

Closed · duplicate
—claimed Minor
web
filed 2026-11-04 11:10 UTC
by xe:8dad6341

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   Node / API

Duplicate of
:   [XE-0082](https://bounty.xe.network/XE-0082) awarded

Tracked
:   —

Updated
:   2026-11-05 22:08 UTC

Told
:   2026-11-05 22:08 UTC

### Patches

None linked.

### History

- [9337](https://bounty.xe.network/log/9337) 2026-11-05 22:08 UTC reply.sent
- [9336](https://bounty.xe.network/log/9336) 2026-11-05 22:08 UTC proposal.adopted
- [9335](https://bounty.xe.network/log/9335) 2026-11-05 22:08 UTC proposal.adopted
- [9334](https://bounty.xe.network/log/9334) 2026-11-05 22:08 UTC ticket.status new → closed
- [9333](https://bounty.xe.network/log/9333) 2026-11-05 22:08 UTC proposal.adopted
- [9332](https://bounty.xe.network/log/9332) 2026-11-05 22:08 UTC ticket.facts
- [9331](https://bounty.xe.network/log/9331) 2026-11-05 22:08 UTC proposal.adopted
- [9330](https://bounty.xe.network/log/9330) 2026-11-05 22:08 UTC ticket.facts
- [7902](https://bounty.xe.network/log/7902) 2026-11-05 14:02 UTC proposal.created
- [7901](https://bounty.xe.network/log/7901) 2026-11-05 14:02 UTC proposal.created
- [7900](https://bounty.xe.network/log/7900) 2026-11-05 14:02 UTC proposal.created
- [7899](https://bounty.xe.network/log/7899) 2026-11-05 14:02 UTC proposal.created

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

### 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

**Joseph Denne**team2026-11-05 22:08 UTCdesk

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.
