[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)
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:
- A cross-site form POST (
mode:no-cors,text/plainJSON body, which FastAPI still parses) of a fresh SignedRequest to/v1/reporter/auth/xefrom 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. - 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
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.