<!-- XE-0656 · [Desk] Reporter sign-in is not bound to the browser that started it: login CSRF signs a victim's browser into an attacker-chosen reporter identity (High) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0656>. The page is the record; this is the same page for reading.*

XE-0656 · Bounty

# \[Desk\] Reporter sign-in is not bound to the browser that started it: login CSRF signs a victim's browser into an attacker-chosen reporter identity (High)

Closed · duplicate
—claimed High
web
filed 2026-11-05 09:47 UTC
by xe:8dad6341

Verdict
:   Duplicate

Tier
:   —

Claimed
:   High

Area
:   Other

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-05 22:10 UTC

Told
:   2026-11-05 22:10 UTC

### Patches

None linked.

### History

- [9487](https://bounty.xe.network/log/9487) 2026-11-05 22:10 UTC reply.sent
- [9486](https://bounty.xe.network/log/9486) 2026-11-05 22:10 UTC proposal.adopted
- [9485](https://bounty.xe.network/log/9485) 2026-11-05 22:10 UTC proposal.adopted
- [9484](https://bounty.xe.network/log/9484) 2026-11-05 22:10 UTC ticket.status new → closed
- [9483](https://bounty.xe.network/log/9483) 2026-11-05 22:10 UTC proposal.adopted
- [9482](https://bounty.xe.network/log/9482) 2026-11-05 22:10 UTC ticket.facts
- [9481](https://bounty.xe.network/log/9481) 2026-11-05 22:10 UTC proposal.adopted
- [9480](https://bounty.xe.network/log/9480) 2026-11-05 22:10 UTC ticket.facts
- [7977](https://bounty.xe.network/log/7977) 2026-11-05 14:02 UTC proposal.created
- [7976](https://bounty.xe.network/log/7976) 2026-11-05 14:02 UTC proposal.created
- [7975](https://bounty.xe.network/log/7975) 2026-11-05 14:02 UTC proposal.created
- [7974](https://bounty.xe.network/log/7974) 2026-11-05 14:02 UTC proposal.created

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

### Report

# \[Desk\] Reporter sign-in is not bound to the browser that started it (High)

**Repo pin:** `xeprotocol/desk` master @ 2026-11-04. The desk is explicitly in scope per
bounty.xe.network/scope ("This desk is in scope for the bounty from the day it went public").
**CWE:** CWE-352 (CSRF) — session establishment. **CVSS 3.1:** 8.6 High —
`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`. **Suggested tier:** High (10,000 XE).
**PoC status:** mechanism verified line-by-line in source; the OAuth variant needs two browsers
against the live desk — not executed.

## XE-NEW-10 — Reporter sign-in is not bound to the browser that started it: login CSRF signs a victim's browser into an attacker-chosen reporter identity (High, desk)

**Component:** `desk/api/reporter.py:317-329` (`xe_login`), `desk/api/reporter.py:108-158`
(`github_callback`), `desk/api/reporter.py:199-243` (`discord_callback`), `desk/api/reporter.py:56-60`
(`_sign_in`), `desk/auth.py:120-130` (`set_session_cookie`, SameSite\=Lax)
**CWE:** CWE-352 (CSRF) — session establishment. **CVSS:** 8.6 High —
`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N` (victim must visit an attacker page; the payoff is
the attacker reading the victim's sealed Critical/Severe report and payout address).
**Suggested tier:** High (10,000 XE). **PoC status:** mechanism verified in source; the OAuth
variant needs two browsers (attacker \+ victim) against the live desk — not executed.

**Mechanism.** Every other reporter route that changes identity goes through
`_reporter(who, request)`, which enforces `X-Desk-CSRF` (`bind_payout` at :331, `email_start` at
:284, `email_finish` at :295). `xe_login` is the exception: a POST that takes an
attacker-suppliable `SignedRequest` under `xe/desk/login/v1` and ends in `_sign_in`, which sets the
`desk_reporter` cookie — with no CSRF token. The OAuth callbacks are GETs that accept any `state`
from any browser: the `Challenge` row is deleted on first use but is never tied to the browser that
created it (no cookie, no PKCE verifier, no nonce), and `discord_start` uses `prompt=none` so
Discord re-authorises silently. `_link_target` (:108-115) refuses only the **merge** direction when
the callback browser is not the one that asked; it does nothing about the **sign-in** direction.
`auth.verify_signed`'s single-use `seen_signatures` row is the only cost, and the attacker holds
the key, so one fresh signature per victim is free.

Two triggers, same outcome:

1. A cross-site form POST (`mode:no-cors`, `text/plain` JSON body, which FastAPI still parses) of a
   fresh SignedRequest to `/v1/reporter/auth/xe` from the victim's browser. The response's
   Set-Cookie (SameSite\=Lax — Lax restricts *sending* on cross-site subrequests, not *setting*) is
   stored, so the victim's browser now holds the attacker's reporter session.
2. The attacker starts GitHub/Discord OAuth (signed out, `link_to=None`) and sends the victim's
   browser the callback URL with their code\+state. The victim's browser completes the flow and is
   signed in as the attacker's GitHub/Discord identity.

**Impact.** The victim's browser is silently signed in as an attacker-controlled reporter. Any
private report the victim then files — Critical/Severe reports are private by default, body and
attachments sealed with the vault key — is attached to the attacker's reporter row. The attacker
reads the sealed body through `GET /v1/tickets/{id}` and `/my`, sees the payout address via
`read:payout_address`, and the award/paid flow pays them. This is the exact asset the desk exists
to protect (sealed reports \+ payout binding), taken without touching the victim's account.

**Dedup.** Distinct from XE-0253, which is the merge direction (`from_platform`/`from_github` with
`link_to`) — `_link_target` already guards that path. This is the sign-in direction, which nothing
guards. No other dedup entry covers reporter session establishment.

**Fix.** Require the CSRF token on `xe_login` like every other identity-changing route, and bind
the OAuth `state` to the initiating browser (a nonce in a short-lived cookie checked at callback),
so a state handed to another browser is a plain sign-in there — never a session for someone else.

---

### Thread

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

Thanks. This is the same finding as https://bounty.xe.network/XE-0302, 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.
