Bounty
XE-13266 · Bounty

[Re-report] XE-0116 still unfixed at HEAD 89a542e: POST /attestation/request signs forged zero-mid identifiers

Closed · invalid —claimed High xe#403 filed 2026-11-11 18:57 UTC by zvsvev

Report

[Re-report] XE-0116 still unfixed at HEAD 89a542e: POST /attestation/request signs forged zero-mid identifiers

Original ticket: XE-0116 — "POST /attestation/request signs any identifier whose hex[0:32] and hex[48:] match a registered account and whose middle 16 are zero; no caller proof; limiter keyed on identifier" Original status: awarded, verdict valid, assessed High, award 3,500 XE, disclosed 2026-11-08 (GitHub issue xeprotocol/xe#308, internal ref xeprotocol/core#1068) This report: re-report — the defect is still present in the public repo snapshot. It is NOT a new bug. Filed in the style of XE-0608 (patched-but-still-broken).

Claimed fix and why it did not land

Patch refs on the ticket:

  • xeprotocol/xe PR #342 ("fix(node,api): require caller ownership for provider attestations and key limiter on source (Fixes #308)"). Verified 2026-11-11: still OPEN, never merged (gh pr view 342, state OPEN, mergedAt null).
  • xeprotocol/core PR #1105 ("fix: the attestation route no longer signs other accounts identifiers"). State not verifiable from public: the repo xeprotocol/core does not resolve via the public GitHub API from this environment, and the board records no state for it. Either way, no fix is present in the public xe snapshot below.

Still broken at HEAD 89a542e ("release: testnet-0005 quorum withhold fix")

node/attestation.go:40-52 (canAttest) still contains the zero-mid bypass verbatim:

const zeroMid = "0000000000000000"
if identifier[32:48] == zeroMid {
    for _, reg := range n.Directory.List() {
        a := reg.Account
        if len(a) == 64 && a[:32] == identifier[:32] && a[48:] == identifier[48:] {
            return nil
        }
    }
}

Any 64-hex identifier whose first 32 and last 16 hex chars match a registered provider account, with 16 zero chars in the middle, is accepted — no caller-ownership proof anywhere on the path:

  • node/node.go:2218 (RequestAttestation): checks only identifier length (64), the per-source rate limit, and canAttest, then core.SignAttestation(identifier, ts, ...).
  • api/handler.go:916-933: HTTP POST /attestation/request calls it with no authentication.
  • node/attestation.go:71 (P2P handler): from is only a libp2p peer ID, not account ownership.

Reproduction (local, throwaway test — created, run, deleted; repo clean)

kp, _ := core.GenerateKeyPair()
dir := directory.New(0)
reg := directory.NewRegistration("12D3KooWTestPeerRepro0116", time.Now().UnixNano(), kp)
dir.Register(reg) // valid provider registration, signature via SignRegistration
n := &Node{Directory: dir}
acct := kp.Address() // 64 hex chars
forged := acct[:32] + "0000000000000000" + acct[48:]
n.canAttest(forged) // -> nil (accepted)

Output, 2026-11-11:

BUG REPRODUCED (XE-0116): canAttest accepted forged zero-mid identifier
bb0c89d79ccc4dcdb3db00edcd26be05 0000000000000000 653f47786f173174

Sanity check in the same test: canAttest on the real registered account is also accepted, as expected. No live POST was sent (signing oracle probe is out of scope for read-only verification).

Impact — stated honestly

This is a timestamp-signing oracle for synthetic identifiers: anyone can obtain the node's signature over an identifier that is not a real lease or account. Direct use for lease settlement still needs an attestation over a real lease hash, so this is not a direct settle bypass — but the exact pattern the ticket reported is intact on the exact path, with the fix PR unmerged. Suggested severity: High, as originally assessed (3,500 XE award).

Duplicate check performed 2026-11-11

Board API /v1/tickets?q=attestation&status=open&limit=200 — 73 tickets scanned. Related but different aspects only: XE-0030 (rate-limit check-then-act), XE-3024 (unbounded rate-limit map). No re-report of the zero-mid / caller-proof gap. Residual risk, stated honestly: tickets beyond the board's search index cannot be fully excluded.

Environment

  • Repo: github.com/xeprotocol/xe, HEAD 89a542e, Go 1.25
  • No live requests were sent for this finding; verification is code + local test only.

Thread

XE deskteam2026-11-20 00:24 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links https://bounty.xe.network/XE-13266 and says what; it is read like any other.